*** file.c 1997/11/03 05:39:29 1.5 --- file.c 1997/11/18 00:41:24 1.6 *************** *** 786,788 **** b = DialogF(DF_QUES, window->shell, 3, "New Checking Mode?", ! "Prompt To Reload", "Tail -f", "Disabled"); if(b == 1) { --- 786,788 ---- b = DialogF(DF_QUES, window->shell, 3, "New Checking Mode?", ! "Prompt To Reload", "Log File Monitor", "Disabled"); if(b == 1) { *** help.c.in 1997/11/03 06:51:15 1.6 --- help.c.in 1997/11/18 00:41:42 1.7 *************** *** 68,71 **** "X Resources", ! "Macros, Learn/Replay", ! "Actions", "Problems/Bugs", --- 68,75 ---- "X Resources", ! "Key Binding", ! "Learn/Replay", ! "Macro Language", ! "Macro Subroutines", ! "Actions Routines", ! "Highlighting Patterns", "Problems/Bugs", *************** *** 1268,1316 **** \n\ ! Auto Indent -- Maintain a running indent. Pressing\n\ ! the return key will line up the cursor with the\n\ ! indent level of the previous line.\n\ ! \n\ ! Auto Newline Wrap -- Wrap text at word boundaries when\n\ ! the cursor reaches the right margin, by replacing\n\ ! the space or tab at the last word boundary with a\n\ ! newline character.\n\ ! \n\ ! Continuous Wrap -- Wrap long lines which extend past\n\ ! the right margin. This mode is typically used to\n\ ! produce files where newlines are ommitted within\n\ ! paragraphs, to make text filling automatic (a kind\n\ ! of poor-man's word processor). Text of this style\n\ ! is common on Macs and PCs but is not necessarily\n\ ! supported very well under Unix (except in programs\n\ ! which deal with e-mail, for which it is often the\n\ ! format of choice).\n\ ! \n\ ! Wrap Margin... -- Set margin for Auto Newline Wrap,\n\ ! Continuous Wrap, and Fill Paragraph. By default,\n\ ! lines wrap at the right margin of the window, but a\n\ ! wrap margin can also be set at a specific column.\n\ \n\ ! Preserve Last Version -- On Save, write a backup copy\n\ ! of the file as it existed before the Save command\n\ ! with the extension .bck (Unix only).\n\ ! The extension can be changed with the backupSuffix\n\ ! resouce. (See X Resources).\n\ \n\ ! Incremental Backup -- Periodically make a backup copy\n\ ! of the file being edited under the name ~filename\n\ ! on Unix or _filename on VMS (see Crash Recovery).\n\ \n\ ! Show Matching (..) -- Momentarily highlight matching\n\ ! parenthesis, brackets, and braces when one of\n\ ! these characters is typed, or when the insertion\n\ ! cursor is positioned after it.\n\ \n\ ! Text Font... -- Set the font for the text in this\n\ ! NEdit window. To set the font for all windows\n\ ! use the equivalent item in the Default Settings\n\ ! sub-menu. Note that since the font selection\n\ ! dialog narrows its lists of font characteristics\n\ ! depending on those already selected, it is\n\ ! important to know that you can unselect them\n\ ! by clicking on the selected items a second time.\n\ \n\ --- 1272,1335 ---- \n\ ! Preferences Menu\n\ \n\ ! Default Settings -- Menu of initial settings for\n\ ! future windows. Generally the same as the\n\ ! options in the main part of the menu, but apply\n\ ! as defaults for future windows created during\n\ ! this NEdit session. These settings can be saved\n\ ! using the Save Defaults command below, to be\n\ ! loaded automatically each time NEdit is started.\n\ \n\ ! Save Defaults -- Save the default options as set\n\ ! under Default Settings for future NEdit sessions.\n\ \n\ ! Statistics Line -- Show the full file name, line\n\ ! number, and length of the file being edited.\n\ ! \n\ ! Incremental Search Line -- Enables the incremental\n\ ! search line just below the menu bar.\n\ \n\ ! Language Mode -- Tells NEdit what language (if any) to\n\ ! assume, for selecting language-specific features\n\ ! such as highlight patterns and smart indent macros,\n\ ! and setting language specific preferences like word\n\ ! delimiters, tab emulation, and auto-indent. See\n\ ! Features for Programming -> Programming With NEdit\n\ ! for more information.\n\ ! \n\ ! Highlight Syntax -- If NEdit recognizes the language\n\ ! being edited, and highlighting patterns are\n\ ! available for that language, use fonts and colors\n\ ! to enhance viewing of the file. (See Help ->\n\ ! Features for Programming -> Syntax Highlighting\n\ ! for more information.\n\ ! \n\ ! Auto Indent -- Setting Auto Indent \"on\" maintains a\n\ ! running indent (pressing the return key will line\n\ ! up the cursor with the indent level of the previous\n\ ! line). If smart indent macros are available for\n\ ! the current language mode, smart indent can be\n\ ! selected and NEdit will attempt to guess proper\n\ ! language indentation for each new line. See\n\ ! Help -> Features for Programming -> Automatic\n\ ! Indent for more information.\n\ ! \n\ ! Wrap -- Choose between two styles of automatic wrapping\n\ ! or none. Auto Newline wrap, wraps text at word\n\ ! boundaries when the cursor reaches the right margin,\n\ ! by replacing the space or tab at the last word\n\ ! boundary with a newline character. Continuous Wrap\n\ ! wraps long lines which extend past the right margin.\n\ ! Continuous Wrap mode is typically used to produce\n\ ! files where newlines are ommitted within paragraphs,\n\ ! to make text filling automatic (a kind of poor-man's\n\ ! word processor). Text of this style is common on\n\ ! Macs and PCs but is not necessarily supported very\n\ ! well under Unix (except in programs which deal with\n\ ! e-mail, for which it is often the format of choice).\n\ ! \n\ ! Wrap Margin -- Set margin for Auto Newline Wrap,\n\ ! Continuous Wrap, and Fill Paragraph. Lines may,\n\ ! be wrapped at the right margin of the window, or\n\ ! the margin can be set at a specific column.\n\ \n\ *************** *** 1321,1347 **** \n\ ! Statistics Line -- Show the full file name, line\n\ ! number, and length of the file being edited.\n\ ! \n\ ! Incremental Search Line -- Enables the incremental\n\ ! search line just below the menu bar.\n\ \n\ ! Default Settings -- Sub-menu of initial settings\n\ ! for future windows. These are the same as the\n\ ! options in the main part of the menu, but apply\n\ ! as defaults for future windows created during\n\ ! this NEdit session. These settings can be saved\n\ ! using the Save Defaults command below, to be\n\ ! loaded automatically each time NEdit is started.\n\ \n\ ! On Exit Open Files Warning -- Enables an on exit\n\ ! confirmation dialog that lists the files that\n\ ! you have open that allows you to cancel the exit\n\ ! operation.\n\ \n\ ! Allow Read Only Edits -- Controls if the text area is\n\ ! editable eventhough the file is read only or\n\ ! locked.\n\ \n\ ! Save Defaults -- Save the default options as set\n\ ! under Default Settings for future NEdit sessions.\n\ \n\ --- 1340,1383 ---- \n\ ! Text Font... -- Change the font(s) used to display\n\ ! text (fonts for menus and dialogs must be set\n\ ! using X resources for the text area of the window).\n\ ! See below for more information.\n\ \n\ ! Make Backup Copy -- On Save, write a backup copy of\n\ ! the file as it existed before the Save command\n\ ! with the extension .bck (Unix only).\n\ \n\ ! Incremental Backup -- Periodically make a backup copy\n\ ! of the file being edited under the name ~filename\n\ ! on Unix or _filename on VMS (see Crash Recovery).\n\ \n\ ! Show Matching (..) -- Momentarily highlight matching\n\ ! parenthesis, brackets, and braces when one of\n\ ! these characters is typed, or when the insertion\n\ ! cursor is positioned after it.\n\ \n\ ! Checking Mode -- Options for controlling the \n\ ! automatic checking if the file being edited has been changed\n\ ! by an external source.\n\ ! \n\ ! Prompt To Reload - When the file has changed the user is\n\ ! prompted to confirm the reload of the file.\n\ ! The file is only checked when the input focus changes.\n\ ! \n\ ! Disabled - Disables automatic checking.\n\ ! \n\ ! Log File Monitor - File checking mode that is intended for the \n\ ! monitoring of log files. It has the following behavior.\n\ ! \n\ ! - If the file gets larger only the information added to the \n\ ! end of the file is read.\n\ ! - If the file gets smaller the whole file will be reread.\n\ ! - Note that the file will not be reread if the file is changed\n\ ! but the size stays the same.\n\ ! - Updated are done automatically without user intervention.\n\ ! - The file is forced Read Only(locked).\n\ ! - The checking interval in milliseconds is set by the \n\ ! logFileMonitorInterval X resource. The default value is 1000.\n\ ! The previous name of this resource, tailMinusFInterval,\n\ ! is still supported. \n\ \n\ *************** *** 1374,1375 **** --- 1410,1415 ---- \n\ + Syntax Highlighting -- Program and configure enhanced\n\ + text display for new or supported languages (See\n\ + Features for Programming -> Syntax Highlighting).\n\ + \n\ Customize Menus -- Add/remove items from the Shell,\n\ *************** *** 1390,1394 **** \n\ ! Syntax Highlighting -- Program and configure enhanced\n\ ! text display for new or supported languages (See\n\ ! Features for Programming -> Syntax Highlighting).\n\ \n\ --- 1430,1464 ---- \n\ ! On Exit Open Files Warning -- Enables an on exit\n\ ! confirmation dialog that lists the files that\n\ ! you have open that allows you to cancel the exit\n\ ! operation.\n\ ! \n\ ! Allow Read Only Edits -- Controls if the text area is\n\ ! editable eventhough the file is read only or\n\ ! locked.\n\ ! \n\ ! Checking Mode -- Options for controlling the \n\ ! automatic checking if the file being edited has been changed\n\ ! by an external source.\n\ ! \n\ ! Prompt To Reload - When the file has changed the user is\n\ ! prompted to confirm the reload of the file.\n\ ! The file is only checked when the input focus changes.\n\ ! \n\ ! Disabled - Disables automatic checking.\n\ ! \n\ ! Log File Monitor - File checking mode that is intended for the \n\ ! monitoring of log files. It has the following behavior.\n\ ! \n\ ! - If the file gets larger only the information added to the \n\ ! end of the file is read.\n\ ! - If the file gets smaller the whole file will be reread.\n\ ! - Note that the file will not be reread if the file is changed\n\ ! but the size stays the same.\n\ ! - Updated are done automatically without user intervention.\n\ ! - The file is forced Read Only(locked).\n\ ! - The checking interval in milliseconds is set by the \n\ ! logFileMonitorInterval X resource. The default value is 1000.\n\ ! The previous name of this resource, tailMinusFInterval,\n\ ! is still supported. \n\ \n\ *** menu.c 1997/11/11 00:45:04 1.6 --- menu.c 1997/11/18 00:41:24 1.7 *************** *** 778,780 **** window->checkingModePromptToReloadDefItem = btn = createMenuToggle(subPane2, ! "checkingModePromptToReload", "Prompt To Reload", 'N', checkingModePromptToReloadDefCB, window, False, SHORT); --- 778,780 ---- window->checkingModePromptToReloadDefItem = btn = createMenuToggle(subPane2, ! "checkingModePromptToReload", "Prompt To Reload", 'P', checkingModePromptToReloadDefCB, window, False, SHORT); *************** *** 786,788 **** window->checkingModeTailMinusFDefItem = btn = createMenuToggle(subPane2, ! "checkingModeTailMinusF", "Tail -f", 'T', checkingModeTailMinusFDefCB, window, False, SHORT); --- 786,788 ---- window->checkingModeTailMinusFDefItem = btn = createMenuToggle(subPane2, ! "checkingModeTailMinusF", "Log File Monitor", 'L', checkingModeTailMinusFDefCB, window, False, SHORT); *************** *** 878,880 **** NULL, FULL); ! window->checkingModePromptToReloadItem = createMenuToggle(subPane2, "checkingModePromptToReload", "Prompt To Reload", 'N', checkingModePromptToReloadCB, window, window->editorInfo->checkingMode == CHECKING_MODE_PROMPT_TO_RELOAD, SHORT); --- 878,880 ---- NULL, FULL); ! window->checkingModePromptToReloadItem = createMenuToggle(subPane2, "checkingModePromptToReload", "Prompt To Reload", 'P', checkingModePromptToReloadCB, window, window->editorInfo->checkingMode == CHECKING_MODE_PROMPT_TO_RELOAD, SHORT); *************** *** 882,884 **** checkingModeDisabledCB, window, window->editorInfo->checkingMode == CHECKING_MODE_DISABLED, SHORT); ! window->checkingModeTailMinusFItem = createMenuToggle(subPane2, "checkingModeTailMinusF", "Tail -f", 'T', checkingModeTailMinusFCB, window, window->editorInfo->checkingMode == CHECKING_MODE_TAIL_MINUS_F, SHORT); --- 882,884 ---- checkingModeDisabledCB, window, window->editorInfo->checkingMode == CHECKING_MODE_DISABLED, SHORT); ! window->checkingModeTailMinusFItem = createMenuToggle(subPane2, "checkingModeTailMinusF", "Log File Monitor", 'L', checkingModeTailMinusFCB, window, window->editorInfo->checkingMode == CHECKING_MODE_TAIL_MINUS_F, SHORT); *** preferences.c 1997/11/05 08:35:42 1.5 --- preferences.c 1997/11/19 21:38:43 1.7 *************** *** 239,241 **** keyEnd = $cursor-startScan\n\ ! keyStart = search_string(scanString, \"<\", keyEnd, \"backward\", \"regex\")\n\ if (keyStart == -1)\n\ --- 239,241 ---- keyEnd = $cursor-startScan\n\ ! keyStart = search_string(scanString, \"<\", keyEnd-1, \"backward\", \"regex\")\n\ if (keyStart == -1)\n\ *************** *** 641,642 **** --- 641,644 ---- &PrefData.tailMinusFInterval, NULL, False}, + {"logFileMonitorInterval", "logFileMonitorInterval", PREF_INT, "1000"/*milliseconds*/, + &PrefData.tailMinusFInterval, NULL, False}, }; *************** *** 3267,3270 **** XtSetSensitive(window->highlightItem, haveHighlightPatterns); ! XtSetSensitive(window->smartIndentItem, haveSmartIndentMacros); ! /* Turn off requested options which are not available */ --- 3269,3279 ---- XtSetSensitive(window->highlightItem, haveHighlightPatterns); ! /* Smart Indent is a buffer/file attribute and not a window ! specific attribute so we must update all of the cloned windows. */ ! { ! WindowInfo *w; ! for(w = window->editorInfo->master; w; w = w->nextSlave) { ! XtSetSensitive(w->smartIndentItem, haveSmartIndentMacros); ! } ! } /* var scope */ ! /* Turn off requested options which are not available */ *** shell.c 1997/10/24 22:15:53 1.5 --- shell.c 1997/11/19 19:34:19 1.6 *************** *** 954,955 **** --- 954,958 ---- + /* Close the connection to the X display in the child. */ + close(ConnectionNumber(TheDisplay)); + /* close the parent end of the pipes in the child process */ *************** *** 983,985 **** /* change the current working directory to the directory of the current ! file. */ if(cmdDir[0] != 0) --- 986,988 ---- /* change the current working directory to the directory of the current ! file. */ if(cmdDir[0] != 0) *************** *** 991,994 **** /* if we reach here, execl failed */ ! fprintf(stderr, "Error starting shell: %s\n", GetPrefShell()); exit(1); --- 994,1004 ---- + fprintf(stderr, + "Error starting preferred shell: %s\nUsing /bin/sh as a last resort...\n", + GetPrefShell()); + + /* if that failed try /bin/sh as a last resort. */ + execl("/bin/sh", "/bin/sh", "-c", command, 0); + /* if we reach here, execl failed */ ! fprintf(stderr, "Error starting shell: %s\n", "/bin/sh"); exit(1); *** text.c 1997/10/24 00:52:56 1.4 --- text.c 1997/11/19 18:33:42 1.5 *************** *** 2585,2587 **** /* Skip the first set of delimiters */ ! while(strchr(delimiters, BufGetCharacter(buf, pos)) != NULL) { pos++; --- 2585,2588 ---- /* Skip the first set of delimiters */ ! while(strchr(delimiters, BufGetCharacter(buf, pos)) != NULL ! && pos < buf->length) { pos++; *** undo.c 1997/10/10 00:15:48 1.2 --- undo.c 1997/11/19 20:51:14 1.3 *************** *** 264,265 **** --- 264,266 ---- WindowInfo *w; + SetBackgroundMenuUndoSensitivity(window, True); for(w = window->editorInfo->master; w; w = w->nextSlave) { *************** *** 294,295 **** --- 295,297 ---- WindowInfo *w; + SetBackgroundMenuRedoSensitivity(window, True); for(w = window->editorInfo->master; w; w = w->nextSlave) { *************** *** 325,326 **** --- 327,329 ---- WindowInfo *w; + SetBackgroundMenuUndoSensitivity(window, False); for(w = window->editorInfo->master; w; w = w->nextSlave) { *************** *** 345,346 **** --- 348,350 ---- WindowInfo *w; + SetBackgroundMenuRedoSensitivity(window, False); for(w = window->editorInfo->master; w; w = w->nextSlave) { *** userCmds.c 1997/11/03 06:51:15 1.5 --- userCmds.c 1997/11/19 20:52:08 1.6 *************** *** 962,965 **** { ! if (window->bgMenuUndoItem != NULL) ! XtSetSensitive(window->bgMenuUndoItem, sensitive); } --- 962,968 ---- { ! WindowInfo *w; ! for(w = window->editorInfo->master; w; w = w->nextSlave) { ! if (w->bgMenuUndoItem != NULL) ! XtSetSensitive(w->bgMenuUndoItem, sensitive); ! } } *************** *** 967,970 **** { ! if (window->bgMenuRedoItem != NULL) ! XtSetSensitive(window->bgMenuRedoItem, sensitive); } --- 970,976 ---- { ! WindowInfo *w; ! for(w = window->editorInfo->master; w; w = w->nextSlave) { ! if (w->bgMenuRedoItem != NULL) ! XtSetSensitive(w->bgMenuRedoItem, sensitive); ! } } *** window.c 1997/10/27 22:06:03 1.7 --- window.c 1997/11/19 21:44:36 1.9 *************** *** 211,212 **** --- 211,216 ---- + /* Interface elements that we test for existance */ + window->bgMenuUndoItem = NULL; + window->bgMenuRedoItem = NULL; + /* Create a new toplevel shell to hold the window */ *************** *** 453,455 **** ClearRedoList(window); ! XmTextSetString(window->statsLine, ""); /* resets scroll pos of stats line from long file names */ --- 457,459 ---- ClearRedoList(window); ! XmTextFieldSetString(window->statsLine, ""); /* resets scroll pos of stats line from long file names */ *************** *** 761,762 **** --- 765,770 ---- + /* Make sure selections are handled. Transfer the selection + ownership to the new last focus window */ + HandleXSelections(window->lastFocus); + /* Update the window manager size hints after the sizes of the panes have *************** *** 838,840 **** window->modeMessageDisplayed = True; ! XmTextSetString(window->statsLine, message); ShowStatsLine(window, True); --- 846,848 ---- window->modeMessageDisplayed = True; ! XmTextFieldSetString(window->statsLine, message); ShowStatsLine(window, True); *************** *** 1604,1610 **** } ! XmTextReplace(statW, 0, XmTextGetLastPosition(statW), sleft + 1); } else ! XmTextReplace(statW, 0, XmTextGetLastPosition(statW), string); #else ! XmTextReplace(statW, 0, XmTextGetLastPosition(statW), string); #endif --- 1612,1618 ---- } ! XmTextFieldSetString(statW, sleft + 1); } else ! XmTextFieldSetString(statW, string); #else ! XmTextFieldSetString(statW, string); #endif