From 0be4ec9e316b50d4bae474f781a432978e3c3afc Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Sat, 14 Nov 2009 13:12:37 +0100 Subject: [PATCH] more ProOpen and PostOpen hook points --- backup-tilde-at-end.patch | 2 +- closeTabNoPrompt.diff | 4 +- close_shift_menu_entry.patch | 2 +- detectlangmode.patch | 2 +- dont-resize-window.patch | 2 +- drag-move.patch | 6 +-- ewmh-raise.diff | 2 +- handle_hardlink.patch | 20 +++---- keep_state_for_bck_file.patch | 8 +-- macro_hooks.patch | 120 ++++++++++++++++++++++++++++++----------- matching_patterns.patch | 10 ++-- newTabTab.patch | 12 ++--- radioOpenPrev.diff | 2 +- read_from_pipes.patch | 4 +- relativeFileNormalization.diff | 26 ++++----- remote-nc.patch | 29 +++++----- remove_zero_sized_files.patch | 8 +-- saveSearchHistory.patch | 2 +- select_word.patch | 2 +- setWindowTitleFormat.diff | 8 +-- switch_tabs.patch | 2 +- tab_detach_move_keys.patch | 2 +- transient-documents.patch | 26 ++++----- 23 files changed, 179 insertions(+), 122 deletions(-) diff --git a/backup-tilde-at-end.patch b/backup-tilde-at-end.patch index c9fa1b8..1785acc 100644 --- a/backup-tilde-at-end.patch +++ b/backup-tilde-at-end.patch @@ -6,7 +6,7 @@ diff --quilt old/source/file.c new/source/file.c --- old/source/file.c +++ new/source/file.c -@@ -1486,11 +1486,11 @@ static void backupFileName(WindowInfo *w +@@ -1487,11 +1487,11 @@ static void backupFileName(WindowInfo *w #else if (window->path[0]) { diff --git a/closeTabNoPrompt.diff b/closeTabNoPrompt.diff index 6dc4295..53aaca6 100644 --- a/closeTabNoPrompt.diff +++ b/closeTabNoPrompt.diff @@ -18,7 +18,7 @@ diff --quilt old/source/window.c new/source/window.c static void raiseTabCB(Widget w, XtPointer clientData, XtPointer callData); static Widget createTextArea(Widget parent, WindowInfo *window, int rows, int cols, int emTabDist, char *delimiters, int wrapMargin, -@@ -4928,10 +4928,15 @@ static void closeTabProc(XtPointer clien +@@ -4929,10 +4929,15 @@ static void closeTabProc(XtPointer clien CloseFileAndWindow((WindowInfo*)clientData, PROMPT_SBC_DIALOG_RESPONSE); } @@ -35,7 +35,7 @@ diff --quilt old/source/window.c new/source/window.c { /* FIXME: XtRemoveActionHook() related coredump -@@ -4950,8 +4955,15 @@ static void closeTabCB(Widget w, Widget +@@ -4951,8 +4956,15 @@ static void closeTabCB(Widget w, Widget While its actual mechanism is not well understood, we somehow managed to workaround the bug by delaying the action of closing the tab. For now. */ diff --git a/close_shift_menu_entry.patch b/close_shift_menu_entry.patch index 9f99171..bc8b941 100644 --- a/close_shift_menu_entry.patch +++ b/close_shift_menu_entry.patch @@ -56,7 +56,7 @@ diff --quilt old/source/menu.c new/source/menu.c diff --quilt old/source/nedit.c new/source/nedit.c --- old/source/nedit.c +++ new/source/nedit.c -@@ -242,7 +242,8 @@ static char *fallbackResources[] = { +@@ -243,7 +243,8 @@ static char *fallbackResources[] = { "*fileMenu.openSelected.accelerator: Ctrly", "*fileMenu.openSelected.acceleratorText: Ctrl+Y", "*fileMenu.close.accelerator: Ctrlw", diff --git a/detectlangmode.patch b/detectlangmode.patch index fc28c9a..cd81a55 100644 --- a/detectlangmode.patch +++ b/detectlangmode.patch @@ -8,7 +8,7 @@ Subject: detect language mode while typing diff --quilt old/source/window.c new/source/window.c --- old/source/window.c +++ new/source/window.c -@@ -2476,6 +2476,12 @@ static void modifiedCB(int pos, int nIns +@@ -2477,6 +2477,12 @@ static void modifiedCB(int pos, int nIns /* Check if external changes have been made to file and warn user */ CheckForChangesToFile(window); diff --git a/dont-resize-window.patch b/dont-resize-window.patch index 08d11d0..7ac4e95 100644 --- a/dont-resize-window.patch +++ b/dont-resize-window.patch @@ -52,7 +52,7 @@ diff --quilt old/source/preferences.h new/source/preferences.h diff --quilt old/source/window.c new/source/window.c --- old/source/window.c +++ new/source/window.c -@@ -2769,7 +2769,7 @@ static int updateGutterWidth(WindowInfo* +@@ -2770,7 +2770,7 @@ static int updateGutterWidth(WindowInfo* } } diff --git a/drag-move.patch b/drag-move.patch index e2b5fd3..5cfd2d0 100644 --- a/drag-move.patch +++ b/drag-move.patch @@ -891,7 +891,7 @@ diff --quilt old/source/window.c new/source/window.c return tab; } -@@ -2403,6 +2409,9 @@ static Widget createTextArea(Widget pare +@@ -2404,6 +2410,9 @@ static Widget createTextArea(Widget pare operation and performance will be better without it) */ TextDMaintainAbsLineNum(((TextWidget)text)->text.textD, window->showStats); @@ -901,7 +901,7 @@ diff --quilt old/source/window.c new/source/window.c return text; } -@@ -3758,7 +3767,7 @@ static WindowInfo *getNextTabWindow(Wind +@@ -3759,7 +3768,7 @@ static WindowInfo *getNextTabWindow(Wind ** return the integer position of a tab in the tabbar it ** belongs to, or -1 if there's an error, somehow. */ @@ -910,7 +910,7 @@ diff --quilt old/source/window.c new/source/window.c { WidgetList tabList; int i, tabCount; -@@ -3817,6 +3826,10 @@ void RefreshTabState(WindowInfo *win) +@@ -3818,6 +3827,10 @@ void RefreshTabState(WindowInfo *win) NULL); XmStringFree(s1); XmStringFree(tipString); diff --git a/ewmh-raise.diff b/ewmh-raise.diff index d81007f..336a533 100644 --- a/ewmh-raise.diff +++ b/ewmh-raise.diff @@ -16,7 +16,7 @@ diff --quilt old/source/server.c new/source/server.c XMapRaised(TheDisplay, XtWindow(window->shell)); } return; -@@ -498,8 +499,10 @@ static void processServerCommandString(c +@@ -501,8 +502,10 @@ static void processServerCommandString(c if (*doCommand != '\0') { RaiseDocument(window); diff --git a/handle_hardlink.patch b/handle_hardlink.patch index 58d9611..002aad0 100644 --- a/handle_hardlink.patch +++ b/handle_hardlink.patch @@ -44,7 +44,7 @@ diff --quilt old/source/file.c new/source/file.c window = FindWindowWithFile(name, path); @@ -219,7 +222,38 @@ WindowInfo *EditExistingFile(WindowInfo } - return window; + goto out; } - + @@ -110,10 +110,10 @@ diff --quilt old/source/file.c new/source/file.c + } + } + + out: PostOpenHook(window); - return window; -@@ -911,8 +961,14 @@ int CloseFileAndWindow(WindowInfo *windo +@@ -912,8 +962,14 @@ int CloseFileAndWindow(WindowInfo *windo int SaveWindow(WindowInfo *window) { @@ -130,7 +130,7 @@ diff --quilt old/source/file.c new/source/file.c /* Try to ensure our information is up-to-date */ CheckForChangesToFile(window); -@@ -929,7 +985,7 @@ int SaveWindow(WindowInfo *window) +@@ -930,7 +986,7 @@ int SaveWindow(WindowInfo *window) /* Check for external modifications and warn the user */ if (GetPrefWarnFileMods() && fileWasModifiedExternally(window)) { @@ -139,7 +139,7 @@ diff --quilt old/source/file.c new/source/file.c "%s has been modified by another program.\n\n" "Continuing this operation will overwrite any external\n" "modifications to the file since it was opened in NEdit,\n" -@@ -938,7 +994,7 @@ int SaveWindow(WindowInfo *window) +@@ -939,7 +995,7 @@ int SaveWindow(WindowInfo *window) "use Save As... to save this file under a different name,\n" "or Revert to Saved to revert to the modified version.", "Continue", "Cancel", window->filename); @@ -148,7 +148,7 @@ diff --quilt old/source/file.c new/source/file.c { /* Cancel and mark file as externally modified */ window->lastModTime = 0; -@@ -946,18 +1002,45 @@ int SaveWindow(WindowInfo *window) +@@ -947,18 +1003,45 @@ int SaveWindow(WindowInfo *window) return FALSE; } } @@ -362,7 +362,7 @@ diff --quilt old/source/preferences.h new/source/preferences.h diff --quilt old/source/server.c new/source/server.c --- old/source/server.c +++ new/source/server.c -@@ -457,6 +457,7 @@ static void processServerCommandString(c +@@ -458,6 +458,7 @@ static void processServerCommandString(c window = FindWindowWithFile(filename, pathname); if (window == NULL) { @@ -370,7 +370,7 @@ diff --quilt old/source/server.c new/source/server.c /* Files are opened in background to improve opening speed by defering certain time consuiming task such as syntax highlighting. At the end of the file-opening loop, the -@@ -467,6 +468,13 @@ static void processServerCommandString(c +@@ -468,6 +469,13 @@ static void processServerCommandString(c filename, pathname, editFlags, geometry, iconicFlag, lmLen == 0 ? NULL : langMode, tabbed == -1? GetPrefOpenInTab() : tabbed, True); @@ -395,7 +395,7 @@ diff --quilt old/source/window.c new/source/window.c /* If window geometry was specified, split it apart into a window position component and a window size component. Create a new geometry string -@@ -1200,6 +1201,35 @@ WindowInfo *FindWindowWithFile(const cha +@@ -1201,6 +1202,35 @@ WindowInfo *FindWindowWithFile(const cha } /* @@ -431,7 +431,7 @@ diff --quilt old/source/window.c new/source/window.c ** Add another independently scrollable pane to the current document, ** splitting the pane which currently has keyboard focus. */ -@@ -4522,6 +4552,7 @@ static void cloneDocument(WindowInfo *wi +@@ -4523,6 +4553,7 @@ static void cloneDocument(WindowInfo *wi window->inode = orgWin->inode; window->fileClosedAtom = orgWin->fileClosedAtom; orgWin->fileClosedAtom = None; diff --git a/keep_state_for_bck_file.patch b/keep_state_for_bck_file.patch index ef4ff3b..6bddc18 100644 --- a/keep_state_for_bck_file.patch +++ b/keep_state_for_bck_file.patch @@ -16,7 +16,7 @@ diff --quilt old/source/file.c new/source/file.c #include #include -@@ -1394,6 +1395,7 @@ static int writeBckVersion(WindowInfo *w +@@ -1395,6 +1396,7 @@ static int writeBckVersion(WindowInfo *w struct stat statbuf; int in_fd, out_fd; char *io_buffer; @@ -24,7 +24,7 @@ diff --quilt old/source/file.c new/source/file.c #define IO_BUFFER_SIZE ((size_t)(1024*1024)) /* Do only if version backups are turned on */ -@@ -1423,8 +1425,8 @@ static int writeBckVersion(WindowInfo *w +@@ -1424,8 +1426,8 @@ static int writeBckVersion(WindowInfo *w } /* Get permissions of the file. @@ -35,7 +35,7 @@ diff --quilt old/source/file.c new/source/file.c if (fstat(in_fd, &statbuf) != 0) { return FALSE; } -@@ -1443,6 +1445,14 @@ static int writeBckVersion(WindowInfo *w +@@ -1444,6 +1446,14 @@ static int writeBckVersion(WindowInfo *w return bckError(window, "fchmod() failed", bckname); } @@ -50,7 +50,7 @@ diff --quilt old/source/file.c new/source/file.c /* Allocate I/O buffer */ io_buffer = (char*) malloc(IO_BUFFER_SIZE); if (NULL == io_buffer) { -@@ -1495,6 +1505,10 @@ static int writeBckVersion(WindowInfo *w +@@ -1496,6 +1506,10 @@ static int writeBckVersion(WindowInfo *w } close(out_fd); diff --git a/macro_hooks.patch b/macro_hooks.patch index 9815da8..e6fd2aa 100644 --- a/macro_hooks.patch +++ b/macro_hooks.patch @@ -27,20 +27,20 @@ The following hooks are present: doc/help.etx | 50 ++++++++++++++++ source/Makefile.common | 1 source/Makefile.dependencies | 2 - source/file.c | 19 ++++++ + source/file.c | 22 ++++++- source/highlightData.c | 1 source/hooks.c | 133 +++++++++++++++++++++++++++++++++++++++++++ source/hooks.h | 15 ++++ source/macro.c | 65 ++++++++++++++++++++- source/macro.h | 3 source/menu.c | 9 +- - source/nedit.c | 24 ++----- + source/nedit.c | 31 ++++------ source/nedit.h | 1 source/preferences.c | 3 source/selection.c | 11 ++- - source/server.c | 56 ++++++++---------- - source/window.c | 21 ++++++ - 16 files changed, 358 insertions(+), 56 deletions(-) + source/server.c | 62 ++++++++++---------- + source/window.c | 22 +++++++ + 16 files changed, 372 insertions(+), 59 deletions(-) diff --quilt old/doc/help.etx new/doc/help.etx --- old/doc/help.etx @@ -129,16 +129,26 @@ diff --quilt old/source/file.c new/source/file.c #include "../util/misc.h" #include "../util/DialogF.h" #include "../util/fileUtils.h" -@@ -272,6 +273,8 @@ WindowInfo *EditExistingFile(WindowInfo +@@ -207,7 +208,7 @@ WindowInfo *EditExistingFile(WindowInfo + else + RaiseDocumentWindow(window); + } +- return window; ++ goto out; + } + + /* If an existing window isn't specified; or the window is already +@@ -272,6 +273,9 @@ WindowInfo *EditExistingFile(WindowInfo AddRelTagsFile(GetPrefTagFile(), path, TAG); AddToPrevOpenMenu(fullname); ++out: + PostOpenHook(window); + return window; } -@@ -934,6 +937,19 @@ static int doSave(WindowInfo *window) +@@ -934,6 +938,19 @@ static int doSave(WindowInfo *window) int fileLen, result; int ret; @@ -158,7 +168,7 @@ diff --quilt old/source/file.c new/source/file.c /* Get the full name of the file */ strcpy(fullname, window->path); strcat(fullname, window->filename); -@@ -1085,6 +1101,9 @@ static int doSave(WindowInfo *window) +@@ -1085,6 +1102,9 @@ static int doSave(WindowInfo *window) window->inode = 0; } @@ -308,7 +318,15 @@ diff --quilt old/source/menu.c new/source/menu.c diff --quilt old/source/nedit.c new/source/nedit.c --- old/source/nedit.c +++ new/source/nedit.c -@@ -389,7 +389,7 @@ static const char cmdLineHelp[] = +@@ -48,6 +48,7 @@ static const char CVSID[] = "$Id: nedit. + #include "interpret.h" + #include "parse.h" + #include "help.h" ++#include "hooks.h" + #include "../util/misc.h" + #include "../util/printUtils.h" + #include "../util/fileUtils.h" +@@ -389,7 +390,7 @@ static const char cmdLineHelp[] = int main(int argc, char **argv) { int i, lineNum, nRead, fileSpecified = FALSE, editFlags = CREATE; @@ -317,7 +335,7 @@ diff --quilt old/source/nedit.c new/source/nedit.c int iconic=False, tabbed = -1, group = 0, isTabbed; char *toDoCommand = NULL, *geometry = NULL, *langMode = NULL; char filename[MAXPATHLEN], pathname[MAXPATHLEN]; -@@ -578,6 +578,10 @@ int main(int argc, char **argv) +@@ -578,6 +579,10 @@ int main(int argc, char **argv) IsServer = True; } @@ -328,7 +346,17 @@ diff --quilt old/source/nedit.c new/source/nedit.c /* Process any command line arguments (-tags, -do, -read, -create, +, -line, -server, and files to edit) not already processed by RestoreNEditPrefs. */ -@@ -693,10 +697,6 @@ int main(int argc, char **argv) +@@ -661,7 +666,8 @@ int main(int argc, char **argv) + numFiles = VMSFileScan(argv[i], &nameList, NULL, INCLUDE_FNF); + /* for each expanded file name do: */ + for (j = 0; j < numFiles; ++j) { +- if (ParseFilename(nameList[j], filename, pathname) == 0) { ++ if (ParseFilename(PreOpenHook(WindowList, nameList[j]), ++ filename, pathname) == 0) { + /* determine if file is to be openned in new tab, by + factoring the options -group, -tabbed & -untabbed */ + if (group == 2) { +@@ -693,10 +699,6 @@ int main(int argc, char **argv) RaiseDocument(lastFile); } @@ -339,7 +367,17 @@ diff --quilt old/source/nedit.c new/source/nedit.c if (gotoLine) SelectNumberedLine(window, lineNum); if (toDoCommand != NULL) { -@@ -750,10 +750,6 @@ int main(int argc, char **argv) +@@ -720,7 +722,8 @@ int main(int argc, char **argv) + if (nameList != NULL) + free(nameList); + #else +- if (ParseFilename(argv[i], filename, pathname) == 0 ) { ++ if (ParseFilename(PreOpenHook(WindowList, argv[i]), ++ filename, pathname) == 0 ) { + /* determine if file is to be openned in new tab, by + factoring the options -group, -tabbed & -untabbed */ + if (group == 2) { +@@ -750,10 +753,6 @@ int main(int argc, char **argv) RaiseDocument(lastFile); } @@ -350,7 +388,7 @@ diff --quilt old/source/nedit.c new/source/nedit.c if (gotoLine) SelectNumberedLine(window, lineNum); if (toDoCommand != NULL) { -@@ -786,13 +782,9 @@ int main(int argc, char **argv) +@@ -786,13 +785,9 @@ int main(int argc, char **argv) } CheckCloseDim(); @@ -453,18 +491,19 @@ diff --quilt old/source/window.c new/source/window.c /* If window geometry was specified, split it apart into a window position component and a window size component. Create a new geometry string -@@ -1029,6 +1032,10 @@ void CloseWindow(WindowInfo *window) - return; - } - +@@ -958,6 +961,11 @@ void CloseWindow(WindowInfo *window) + int keepWindow, state; + WindowInfo *win, *topBuf = NULL, *nextBuf = NULL; + + if (window->inMacroHook) { -+ fprintf(stderr, "nedit: warning closing window while in MacroHook\n"); ++ fprintf(stderr, "nedit: error: closing window while in MacroHook\n"); ++ return; + } + - /* Free syntax highlighting patterns, if any. w/o redisplaying */ - FreeHighlightingData(window); - -@@ -2321,6 +2328,8 @@ static Widget createTextArea(Widget pare + /* Free smart indent macro programs */ + EndSmartIndent(window); + +@@ -2321,6 +2329,8 @@ static Widget createTextArea(Widget pare /* add focus, drag, cursor tracking, and smart indent callbacks */ XtAddCallback(text, textNfocusCallback, (XtCallbackProc)focusCB, window); @@ -473,7 +512,7 @@ diff --quilt old/source/window.c new/source/window.c XtAddCallback(text, textNcursorMovementCallback, (XtCallbackProc)movedCB, window); XtAddCallback(text, textNdragStartCallback, (XtCallbackProc)dragStartCB, -@@ -2373,6 +2382,8 @@ static void movedCB(Widget w, WindowInfo +@@ -2373,6 +2383,8 @@ static void movedCB(Widget w, WindowInfo /* Start blinking the caret again. */ ResetCursorBlink(textWidget, False); } @@ -482,7 +521,7 @@ diff --quilt old/source/window.c new/source/window.c } static void modifiedCB(int pos, int nInserted, int nDeleted, int nRestyled, -@@ -2444,6 +2455,8 @@ static void modifiedCB(int pos, int nIns +@@ -2444,6 +2456,8 @@ static void modifiedCB(int pos, int nIns /* Check if external changes have been made to file and warn user */ CheckForChangesToFile(window); @@ -491,7 +530,7 @@ diff --quilt old/source/window.c new/source/window.c } static void focusCB(Widget w, WindowInfo *window, XtPointer callData) -@@ -2459,6 +2472,13 @@ static void focusCB(Widget w, WindowInfo +@@ -2459,6 +2473,13 @@ static void focusCB(Widget w, WindowInfo /* Check for changes to read-only status and/or file modifications */ CheckForChangesToFile(window); @@ -505,7 +544,7 @@ diff --quilt old/source/window.c new/source/window.c } static void dragStartCB(Widget w, WindowInfo *window, XtPointer callData) -@@ -3466,6 +3486,7 @@ WindowInfo* CreateDocument(WindowInfo* s +@@ -3466,6 +3487,7 @@ WindowInfo* CreateDocument(WindowInfo* s window->bgMenuRedoItem = NULL; window->device = 0; window->inode = 0; @@ -786,7 +825,15 @@ diff --quilt old/source/server.c new/source/server.c char *doCommand, *geometry, *langMode, *inPtr; int editFlags, stringLen = strlen(string); int lineNum, createFlag, readFlag, iconicFlag, lastIconic = 0, tabbed = -1; -@@ -388,7 +380,7 @@ static void processServerCommandString(c +@@ -371,6 +363,7 @@ static void processServerCommandString(c + */ + inPtr = string; + while (TRUE) { ++ int needToCallPostOpenHook = False; + + if (*inPtr == '\0') + break; +@@ -388,7 +381,7 @@ static void processServerCommandString(c inPtr += charsRead + 1; if (inPtr - string + fileLen > stringLen) goto readError; @@ -795,7 +842,7 @@ diff --quilt old/source/server.c new/source/server.c inPtr += fileLen; *inPtr++ = '\0'; if (inPtr - string + doLen > stringLen) -@@ -407,6 +399,8 @@ static void processServerCommandString(c +@@ -407,6 +400,8 @@ static void processServerCommandString(c inPtr += geomLen; *inPtr++ = '\0'; @@ -804,7 +851,7 @@ diff --quilt old/source/server.c new/source/server.c /* An empty file name means: * put up an empty, Untitled window, or use an existing one * choose a random window for executing the -do macro upon -@@ -456,7 +450,7 @@ static void processServerCommandString(c +@@ -456,7 +451,7 @@ static void processServerCommandString(c (createFlag ? SUPPRESS_CREATE_WARN : 0); if (ParseFilename(fullname, filename, pathname) != 0) { fprintf(stderr, "NEdit: invalid file name\n"); @@ -813,7 +860,13 @@ diff --quilt old/source/server.c new/source/server.c break; } -@@ -486,8 +480,8 @@ static void processServerCommandString(c +@@ -482,12 +477,14 @@ static void processServerCommandString(c + } + + } ++ else ++ needToCallPostOpenHook = True; + /* Do the actions requested (note DoMacro is last, since the do command can do anything, including closing the window!) */ if (window != NULL) { @@ -824,8 +877,13 @@ diff --quilt old/source/server.c new/source/server.c if (lineNum > 0) SelectNumberedLine(window, lineNum); -@@ -519,8 +513,8 @@ static void processServerCommandString(c +@@ -517,10 +514,13 @@ static void processServerCommandString(c + if (window) { + lastFile = window; lastIconic = iconicFlag; ++ ++ if (needToCallPostOpenHook) ++ PostOpenHook(window); } } else { - deleteFileOpenProperty2(filename, pathname); diff --git a/matching_patterns.patch b/matching_patterns.patch index e1f6c69..0615d81 100644 --- a/matching_patterns.patch +++ b/matching_patterns.patch @@ -11713,7 +11713,7 @@ diff --quilt old/source/window.c new/source/window.c window->iSearchHistIndex = 0; window->iSearchStartPos = -1; window->replaceLastRegexCase = TRUE; -@@ -3443,7 +3447,6 @@ WindowInfo* CreateDocument(WindowInfo* s +@@ -3444,7 +3448,6 @@ WindowInfo* CreateDocument(WindowInfo* s window->showWrapMargin = GetPrefShowWrapMargin(); window->overstrike = False; window->showMatchingStyle = GetPrefShowMatching(); @@ -11721,7 +11721,7 @@ diff --quilt old/source/window.c new/source/window.c window->highlightSyntax = GetPrefHighlightSyntax(); window->backlightCharTypes = NULL; window->backlightChars = GetPrefBacklightChars(); -@@ -3478,6 +3481,12 @@ WindowInfo* CreateDocument(WindowInfo* s +@@ -3479,6 +3482,12 @@ WindowInfo* CreateDocument(WindowInfo* s window->macroCmdData = NULL; window->smartIndentData = NULL; window->languageMode = PLAIN_LANGUAGE_MODE; @@ -11734,7 +11734,7 @@ diff --quilt old/source/window.c new/source/window.c window->iSearchHistIndex = 0; window->iSearchStartPos = -1; window->replaceLastRegexCase = TRUE; -@@ -3875,7 +3884,6 @@ void RefreshMenuToggleStates(WindowInfo +@@ -3876,7 +3885,6 @@ void RefreshMenuToggleStates(WindowInfo #endif XmToggleButtonSetState(window->autoSaveItem, window->autoSave, False); XmToggleButtonSetState(window->overtypeModeItem, window->overstrike, False); @@ -11742,7 +11742,7 @@ diff --quilt old/source/window.c new/source/window.c XmToggleButtonSetState(window->readOnlyItem, IS_USER_LOCKED(window->lockReasons), False); XmToggleButtonSetState(window->transientItem, window->transient, False); -@@ -4439,6 +4447,9 @@ static void cloneDocument(WindowInfo *wi +@@ -4440,6 +4448,9 @@ static void cloneDocument(WindowInfo *wi if (window->highlightSyntax) StartHighlighting(window, False); @@ -11752,7 +11752,7 @@ diff --quilt old/source/window.c new/source/window.c /* copy states of original document */ window->filenameSet = orgWin->filenameSet; window->fileFormat = orgWin->fileFormat; -@@ -4457,7 +4468,6 @@ static void cloneDocument(WindowInfo *wi +@@ -4458,7 +4469,6 @@ static void cloneDocument(WindowInfo *wi window->wrapMode = orgWin->wrapMode; SetOverstrike(window, orgWin->overstrike); window->showMatchingStyle = orgWin->showMatchingStyle; diff --git a/newTabTab.patch b/newTabTab.patch index f40fdd7..18060b7 100644 --- a/newTabTab.patch +++ b/newTabTab.patch @@ -119,7 +119,7 @@ diff --quilt old/source/window.c new/source/window.c if (tabList[i]->core.being_destroyed) continue; -@@ -2644,7 +2664,7 @@ static void saveYourselfCB(Widget w, Wid +@@ -2645,7 +2665,7 @@ static void saveYourselfCB(Widget w, Wid XtVaGetValues(topWin->tabBar, XmNtabWidgetList, &tabs, XmNtabCount, &tabCount, NULL); @@ -128,7 +128,7 @@ diff --quilt old/source/window.c new/source/window.c win = TabToWindow(tabs[i]); if (win->filenameSet) { /* add filename */ -@@ -3645,7 +3665,7 @@ WindowInfo* CreateDocument(WindowInfo* s +@@ -3646,7 +3666,7 @@ WindowInfo* CreateDocument(WindowInfo* s /* Set the requested hardware tab distance and useTabs in the text buffer */ BufSetTabDistance(window->buffer, GetPrefTabDist(PLAIN_LANGUAGE_MODE)); window->buffer->useTabs = GetPrefInsertTabs(); @@ -137,7 +137,7 @@ diff --quilt old/source/window.c new/source/window.c /* add the window to the global window list, update the Windows menus */ InvalidateWindowMenus(); -@@ -3718,7 +3738,7 @@ static WindowInfo *getNextTabWindow(Wind +@@ -3719,7 +3739,7 @@ static WindowInfo *getNextTabWindow(Wind XtVaGetValues(win->tabBar, XmNtabWidgetList, &tabList, XmNtabCount, &tabCount, NULL); @@ -146,7 +146,7 @@ diff --quilt old/source/window.c new/source/window.c tabs[tabTotalCount++] = tabList[i]; } } -@@ -3728,7 +3748,7 @@ static WindowInfo *getNextTabWindow(Wind +@@ -3729,7 +3749,7 @@ static WindowInfo *getNextTabWindow(Wind XtVaGetValues(window->tabBar, XmNtabWidgetList, &tabList, XmNtabCount, &tabCount, NULL); @@ -155,7 +155,7 @@ diff --quilt old/source/window.c new/source/window.c if (TabToWindow(tabList[i])) /* make sure tab is valid */ tabs[tabTotalCount++] = tabList[i]; } -@@ -3776,7 +3796,7 @@ int getTabPosition(Widget tab) +@@ -3777,7 +3797,7 @@ int getTabPosition(Widget tab) XtVaGetValues(tabBar, XmNtabWidgetList, &tabList, XmNtabCount, &tabCount, NULL); @@ -164,7 +164,7 @@ diff --quilt old/source/window.c new/source/window.c if (tab == tabList[i]) return i; } -@@ -4988,10 +5008,18 @@ static void raiseTabCB(Widget w, XtPoint +@@ -4989,10 +5009,18 @@ static void raiseTabCB(Widget w, XtPoint XmLFolderCallbackStruct *cbs = (XmLFolderCallbackStruct *)callData; WidgetList tabList; Widget tab; diff --git a/radioOpenPrev.diff b/radioOpenPrev.diff index f6a036f..66e30d3 100644 --- a/radioOpenPrev.diff +++ b/radioOpenPrev.diff @@ -133,7 +133,7 @@ diff --quilt old/source/menu.h new/source/menu.h diff --quilt old/source/window.c new/source/window.c --- old/source/window.c +++ new/source/window.c -@@ -1084,6 +1084,7 @@ void CloseWindow(WindowInfo *window) +@@ -1085,6 +1085,7 @@ void CloseWindow(WindowInfo *window) /* remove the window from the global window list, update window menus */ removeFromWindowList(window); InvalidateWindowMenus(); diff --git a/read_from_pipes.patch b/read_from_pipes.patch index fbf2e0d..1b68688 100644 --- a/read_from_pipes.patch +++ b/read_from_pipes.patch @@ -10,7 +10,7 @@ Subject: handle reading from pipes diff --quilt old/source/file.c new/source/file.c --- old/source/file.c +++ new/source/file.c -@@ -494,29 +494,88 @@ static int doOpen(WindowInfo *window, co +@@ -495,29 +495,88 @@ static int doOpen(WindowInfo *window, co return FALSE; } #endif @@ -121,7 +121,7 @@ diff --quilt old/source/file.c new/source/file.c } fileString[readLen] = 0; -@@ -634,27 +693,83 @@ int IncludeFile(WindowInfo *window, cons +@@ -635,27 +694,83 @@ int IncludeFile(WindowInfo *window, cons fclose(fp); return FALSE; } diff --git a/relativeFileNormalization.diff b/relativeFileNormalization.diff index 2cd36e5..d5eb85a 100644 --- a/relativeFileNormalization.diff +++ b/relativeFileNormalization.diff @@ -38,7 +38,7 @@ name from a relative file path. diff --quilt old/source/file.c new/source/file.c --- old/source/file.c +++ new/source/file.c -@@ -1091,7 +1091,7 @@ int SaveWindowAs(WindowInfo *window, con +@@ -1092,7 +1092,7 @@ int SaveWindowAs(WindowInfo *window, con strcpy(fullname, newName); } @@ -47,7 +47,7 @@ diff --quilt old/source/file.c new/source/file.c { return False; } -@@ -1100,7 +1100,7 @@ int SaveWindowAs(WindowInfo *window, con +@@ -1101,7 +1101,7 @@ int SaveWindowAs(WindowInfo *window, con if (addWrap) addWrapNewlines(window); @@ -56,7 +56,7 @@ diff --quilt old/source/file.c new/source/file.c return FALSE; } -@@ -1181,8 +1181,8 @@ static int doSave(WindowInfo *window) +@@ -1182,8 +1182,8 @@ static int doSave(WindowInfo *window) /* call pre_save_hook, and set result as path/name */ fileString = PreSaveHook(window); @@ -67,7 +67,7 @@ diff --quilt old/source/file.c new/source/file.c result = DialogF(DF_ERR, window->shell, 2, "Invalid Filename", "The filename provided by the post_save_hook\n" "('%s')\n" -@@ -1322,7 +1322,7 @@ static int doSave(WindowInfo *window) +@@ -1323,7 +1323,7 @@ static int doSave(WindowInfo *window) #ifdef VMS /* reflect the fact that NEdit is now editing a new version of the file */ @@ -274,21 +274,21 @@ diff --quilt old/source/nc.c new/source/nc.c diff --quilt old/source/nedit.c new/source/nedit.c --- old/source/nedit.c +++ new/source/nedit.c -@@ -671,7 +671,7 @@ int main(int argc, char **argv) - numFiles = VMSFileScan(argv[i], &nameList, NULL, INCLUDE_FNF); +@@ -673,7 +673,7 @@ int main(int argc, char **argv) /* for each expanded file name do: */ for (j = 0; j < numFiles; ++j) { -- if (ParseFilename(nameList[j], filename, pathname) == 0) { -+ if (ParseFilename(nameList[j], filename, pathname, NULL) == 0) { + if (ParseFilename(PreOpenHook(WindowList, nameList[j]), +- filename, pathname) == 0) { ++ filename, pathname, NULL) == 0) { /* determine if file is to be openned in new tab, by factoring the options -group, -tabbed & -untabbed */ if (group == 2) { -@@ -726,7 +726,7 @@ int main(int argc, char **argv) - if (nameList != NULL) +@@ -729,7 +729,7 @@ int main(int argc, char **argv) free(nameList); #else -- if (ParseFilename(argv[i], filename, pathname) == 0 ) { -+ if (ParseFilename(argv[i], filename, pathname, NULL) == 0 ) { + if (ParseFilename(PreOpenHook(WindowList, argv[i]), +- filename, pathname) == 0 ) { ++ filename, pathname, NULL) == 0 ) { /* determine if file is to be openned in new tab, by factoring the options -group, -tabbed & -untabbed */ if (group == 2) { @@ -336,7 +336,7 @@ diff --quilt old/source/selection.c new/source/selection.c diff --quilt old/source/server.c new/source/server.c --- old/source/server.c +++ new/source/server.c -@@ -449,7 +449,7 @@ static void processServerCommandString(c +@@ -450,7 +450,7 @@ static void processServerCommandString(c existing window, or opening if they don't exist */ editFlags = (readFlag ? PREF_READ_ONLY : 0) | CREATE | (createFlag ? SUPPRESS_CREATE_WARN : 0); diff --git a/remote-nc.patch b/remote-nc.patch index 2979775..3715914 100644 --- a/remote-nc.patch +++ b/remote-nc.patch @@ -1,12 +1,12 @@ --- - source/nc.c | 87 +++++++++++++++++++++++++++++++----------- + source/nc.c | 86 +++++++++++++++++++++++++++++++---------- source/server.c | 25 ++++++++---- source/server_common.c | 24 +++++------ source/windowTitle.c | 8 ++- util/utils.c | 101 ++++++++++++++++++++++++++++++++----------------- util/utils.h | 6 +- - 6 files changed, 172 insertions(+), 79 deletions(-) + 6 files changed, 171 insertions(+), 79 deletions(-) diff --quilt old/source/nc.c new/source/nc.c --- old/source/nc.c @@ -49,7 +49,7 @@ diff --quilt old/source/nc.c new/source/nc.c /* Initialize toolkit and get an application context */ XtToolkitInitialize(); -@@ -251,21 +255,27 @@ int main(int argc, char **argv) +@@ -251,21 +255,26 @@ int main(int argc, char **argv) don't support the .nc file anymore) */ prefDB = CreatePreferencesDatabase(NULL, APP_CLASS, OpTable, XtNumber(OpTable), (unsigned *)&argc, argv); @@ -57,9 +57,8 @@ diff --quilt old/source/nc.c new/source/nc.c + /* copy argv/argc because XtOpenDisplay consumes arguments we may need + for the server command line */ + xt_argv = (char**)XtMalloc(sizeof(char*) * (argc + 1)); -+ for (xt_argc = 0; xt_argc < argc; xt_argc++) -+ xt_argv[xt_argc] = argv[xt_argc]; -+ xt_argv[xt_argc] = NULL; ++ memcpy(xt_argv, argv, argc + 1); ++ xt_argc = argc; - /* Process the command line before calling XtOpenDisplay, because the - latter consumes certain command line arguments that we still need @@ -83,7 +82,7 @@ diff --quilt old/source/nc.c new/source/nc.c /* Read the application resources into the Preferences data structure */ RestorePreferences(prefDB, XtDatabase(TheDisplay), APP_NAME, APP_CLASS, PrefDescrip, XtNumber(PrefDescrip)); -@@ -503,7 +513,8 @@ static int startServer(const char *messa +@@ -503,7 +512,8 @@ static int startServer(const char *messa /* prompt user whether to start server */ if (!Preferences.autoStart) { @@ -93,7 +92,7 @@ diff --quilt old/source/nc.c new/source/nc.c do { c = getc(stdin); } while (c == ' ' || c == '\t'); -@@ -605,19 +616,35 @@ static CommandLine processCommandLine(in +@@ -605,19 +615,35 @@ static CommandLine processCommandLine(in */ static void parseCommandLine(int argc, char **argv, CommandLine *commandLine) { @@ -131,7 +130,7 @@ diff --quilt old/source/nc.c new/source/nc.c } /* In case of no arguments, must still allocate space for one record header */ if (length < MAX_RECORD_HEADER_LENGTH) -@@ -735,16 +762,19 @@ static void parseCommandLine(int argc, c +@@ -735,16 +761,19 @@ static void parseCommandLine(int argc, c } /* See below for casts */ @@ -155,7 +154,7 @@ diff --quilt old/source/nc.c new/source/nc.c fileCount++; } if (nameList != NULL) -@@ -777,11 +807,14 @@ static void parseCommandLine(int argc, c +@@ -777,11 +806,14 @@ static void parseCommandLine(int argc, c The "long" cast on strlen() is necessary because size_t is 64 bit on Alphas, and 32-bit on most others. There is no printf format specifier for "size_t", thanx, ANSI. */ @@ -172,7 +171,7 @@ diff --quilt old/source/nc.c new/source/nc.c strcpy(outPtr, path); outPtr += strlen(path); *outPtr++ = '\n'; -@@ -797,7 +830,7 @@ static void parseCommandLine(int argc, c +@@ -797,7 +829,7 @@ static void parseCommandLine(int argc, c toDoCommand = ""; /* Create the file open atoms for the paths supplied */ @@ -181,7 +180,7 @@ diff --quilt old/source/nc.c new/source/nc.c fileCount++; #endif /* VMS */ } -@@ -812,10 +845,17 @@ static void parseCommandLine(int argc, c +@@ -812,10 +844,17 @@ static void parseCommandLine(int argc, c * iconic state (and optional language mode and geometry). */ if (toDoCommand[0] != '\0' || fileCount == 0) { @@ -202,7 +201,7 @@ diff --quilt old/source/nc.c new/source/nc.c strcpy(outPtr, toDoCommand); outPtr += strlen(toDoCommand); *outPtr++ = '\n'; -@@ -826,6 +866,9 @@ static void parseCommandLine(int argc, c +@@ -826,6 +865,9 @@ static void parseCommandLine(int argc, c outPtr += strlen(geometry); *outPtr++ = '\n'; } @@ -215,7 +214,7 @@ diff --quilt old/source/nc.c new/source/nc.c diff --quilt old/source/server.c new/source/server.c --- old/source/server.c +++ new/source/server.c -@@ -373,16 +373,26 @@ static void processServerCommandString(c +@@ -374,16 +374,26 @@ static void processServerCommandString(c command both followed by newlines. This bit of code reads the header, and converts the newlines following the filename and do command to nulls to terminate the filename and doCommand strings */ @@ -248,7 +247,7 @@ diff --quilt old/source/server.c new/source/server.c *inPtr++ = '\0'; if (inPtr - string + doLen > stringLen) goto readError; -@@ -415,7 +425,8 @@ static void processServerCommandString(c +@@ -416,7 +426,8 @@ static void processServerCommandString(c if (*doCommand == '\0') { if (window == NULL) { EditNewFile(findWindowOnDesktop(tabbed, currentDesktop), diff --git a/remove_zero_sized_files.patch b/remove_zero_sized_files.patch index 1ccc555..f37748a 100644 --- a/remove_zero_sized_files.patch +++ b/remove_zero_sized_files.patch @@ -16,7 +16,7 @@ remove the file if the size is 0. diff --quilt old/source/file.c new/source/file.c --- old/source/file.c +++ new/source/file.c -@@ -898,6 +898,33 @@ int CloseAllFilesAndWindows(void) +@@ -899,6 +899,33 @@ int CloseAllFilesAndWindows(void) return TRUE; } @@ -50,7 +50,7 @@ diff --quilt old/source/file.c new/source/file.c int CloseFileAndWindow(WindowInfo *window, int preResponse) { int response, stat; -@@ -921,6 +948,7 @@ int CloseFileAndWindow(WindowInfo *windo +@@ -922,6 +949,7 @@ int CloseFileAndWindow(WindowInfo *windo /* File deleted/modified externally, ignored by user. */ !GetPrefWarnFileMods()))) { @@ -58,7 +58,7 @@ diff --quilt old/source/file.c new/source/file.c RemoveBackupFile(window); CloseWindow(window); /* up-to-date windows don't have outstanding backup files to close */ -@@ -941,6 +969,7 @@ int CloseFileAndWindow(WindowInfo *windo +@@ -942,6 +970,7 @@ int CloseFileAndWindow(WindowInfo *windo stat = SaveWindow(window); if (stat) { @@ -66,7 +66,7 @@ diff --quilt old/source/file.c new/source/file.c CloseWindow(window); } else { -@@ -948,6 +977,7 @@ int CloseFileAndWindow(WindowInfo *windo +@@ -949,6 +978,7 @@ int CloseFileAndWindow(WindowInfo *windo } } else if (response == NO_SBC_DIALOG_RESPONSE) { diff --git a/saveSearchHistory.patch b/saveSearchHistory.patch index 57b2f44..96e9062 100644 --- a/saveSearchHistory.patch +++ b/saveSearchHistory.patch @@ -63,7 +63,7 @@ diff --quilt old/source/nedit.c new/source/nedit.c #include "server.h" #include "interpret.h" #include "parse.h" -@@ -559,6 +560,10 @@ int main(int argc, char **argv) +@@ -560,6 +561,10 @@ int main(int argc, char **argv) command (and eventually other information as well) */ ReadNEditDB(); diff --git a/select_word.patch b/select_word.patch index 6f8d663..e12e626 100644 --- a/select_word.patch +++ b/select_word.patch @@ -107,7 +107,7 @@ diff --quilt old/source/menu.c new/source/menu.c diff --quilt old/source/nedit.c new/source/nedit.c --- old/source/nedit.c +++ new/source/nedit.c -@@ -267,6 +267,8 @@ static char *fallbackResources[] = { +@@ -268,6 +268,8 @@ static char *fallbackResources[] = { "*editMenu.delete.acceleratorText: Del", "*editMenu.selectAll.accelerator: Ctrla", "*editMenu.selectAll.acceleratorText: Ctrl+A", diff --git a/setWindowTitleFormat.diff b/setWindowTitleFormat.diff index 0ac91b9..8f4b2f7 100644 --- a/setWindowTitleFormat.diff +++ b/setWindowTitleFormat.diff @@ -151,7 +151,7 @@ diff --quilt old/source/window.c new/source/window.c window->fileMode = 0; window->fileUid = 0; window->fileGid = 0; -@@ -978,7 +979,13 @@ void CloseWindow(WindowInfo *window) +@@ -983,7 +984,13 @@ void CloseWindow(WindowInfo *window) /* Kill shell sub-process and free related memory */ AbortShellCommand(window); #endif /*VMS*/ @@ -166,7 +166,7 @@ diff --quilt old/source/window.c new/source/window.c /* Unload the default tips files for this language mode if necessary */ UnloadLanguageModeTipsFile(window); -@@ -2098,11 +2105,13 @@ void SetWindowModified(WindowInfo *windo +@@ -2099,11 +2106,13 @@ void SetWindowModified(WindowInfo *windo */ void UpdateWindowTitle(const WindowInfo *window) { @@ -181,7 +181,7 @@ diff --quilt old/source/window.c new/source/window.c title = FormatWindowTitle(window->filename, window->path, #ifdef VMS -@@ -2116,11 +2125,14 @@ void UpdateWindowTitle(const WindowInfo +@@ -2117,11 +2126,14 @@ void UpdateWindowTitle(const WindowInfo window->lockReasons, window->fileChanged, window->transient, @@ -200,7 +200,7 @@ diff --quilt old/source/window.c new/source/window.c if (window->fileChanged && !window->transient) strcat(iconTitle, "*"); XtVaSetValues(window->shell, XmNtitle, title, XmNiconName, iconTitle, NULL); -@@ -3423,6 +3435,7 @@ WindowInfo* CreateDocument(WindowInfo* s +@@ -3424,6 +3436,7 @@ WindowInfo* CreateDocument(WindowInfo* s window->nWritableWindows = 0; window->fileChanged = FALSE; window->fileMissing = True; diff --git a/switch_tabs.patch b/switch_tabs.patch index a41644c..b19e47d 100644 --- a/switch_tabs.patch +++ b/switch_tabs.patch @@ -58,7 +58,7 @@ diff --quilt old/source/menu.c new/source/menu.c diff --quilt old/source/window.c new/source/window.c --- old/source/window.c +++ new/source/window.c -@@ -4059,6 +4059,78 @@ void LastDocument(WindowInfo *window) +@@ -4060,6 +4060,78 @@ void LastDocument(WindowInfo *window) } /* diff --git a/tab_detach_move_keys.patch b/tab_detach_move_keys.patch index eeb4216..83d2182 100644 --- a/tab_detach_move_keys.patch +++ b/tab_detach_move_keys.patch @@ -25,7 +25,7 @@ diff --quilt old/source/menu.c new/source/menu.c diff --quilt old/source/nedit.c new/source/nedit.c --- old/source/nedit.c +++ new/source/nedit.c -@@ -355,6 +355,10 @@ static char *fallbackResources[] = { +@@ -356,6 +356,10 @@ static char *fallbackResources[] = { "*windowsMenu.splitPane.acceleratorText: Ctrl+2", "*windowsMenu.closePane.accelerator: Ctrl1", "*windowsMenu.closePane.acceleratorText: Ctrl+1", diff --git a/transient-documents.patch b/transient-documents.patch index c9a0f14..95114f3 100644 --- a/transient-documents.patch +++ b/transient-documents.patch @@ -120,7 +120,7 @@ diff --quilt old/source/file.c new/source/file.c SortTabBar(window); return window; } -@@ -732,17 +740,22 @@ int CloseFileAndWindow(WindowInfo *windo +@@ -733,17 +741,22 @@ int CloseFileAndWindow(WindowInfo *windo if (window->fileChanged) RaiseDocumentWindow(window); @@ -148,7 +148,7 @@ diff --quilt old/source/file.c new/source/file.c CloseWindow(window); /* up-to-date windows don't have outstanding backup files to close */ } else -@@ -1101,6 +1114,16 @@ static int doSave(WindowInfo *window) +@@ -1102,6 +1115,16 @@ static int doSave(WindowInfo *window) window->inode = 0; } @@ -165,7 +165,7 @@ diff --quilt old/source/file.c new/source/file.c /* call "post_save_hook" */ PostSaveHook(window); -@@ -1215,10 +1238,6 @@ void RemoveBackupFile(WindowInfo *window +@@ -1216,10 +1239,6 @@ void RemoveBackupFile(WindowInfo *window { char name[MAXPATHLEN]; @@ -176,7 +176,7 @@ diff --quilt old/source/file.c new/source/file.c backupFileName(window, name, sizeof(name)); remove(name); } -@@ -1671,29 +1690,37 @@ int PromptForNewFile(WindowInfo *window, +@@ -1672,29 +1691,37 @@ int PromptForNewFile(WindowInfo *window, /* ** Find a name for an untitled file, unique in the name space of in the opened ** files in this session, i.e. Untitled or Untitled_nn, and write it into @@ -612,7 +612,7 @@ diff --quilt old/source/window.c new/source/window.c window->indentStyle = GetPrefAutoIndent(PLAIN_LANGUAGE_MODE); window->autoSave = GetPrefAutoSave(); window->saveOldVersion = GetPrefSaveOldVersion(); -@@ -997,8 +998,9 @@ void CloseWindow(WindowInfo *window) +@@ -1002,8 +1003,9 @@ void CloseWindow(WindowInfo *window) it's running the macro calling us, don't close it, make it Untitled */ if (keepWindow || (WindowList == window && window->next == NULL)) { /* keep the path from the old window */ @@ -623,7 +623,7 @@ diff --quilt old/source/window.c new/source/window.c window->fileMode = 0; window->fileUid = 0; window->fileGid = 0; -@@ -2109,12 +2111,13 @@ void UpdateWindowTitle(const WindowInfo +@@ -2110,12 +2112,13 @@ void UpdateWindowTitle(const WindowInfo window->filenameSet, window->lockReasons, window->fileChanged, @@ -638,7 +638,7 @@ diff --quilt old/source/window.c new/source/window.c strcat(iconTitle, "*"); XtVaSetValues(window->shell, XmNtitle, title, XmNiconName, iconTitle, NULL); -@@ -2441,7 +2444,8 @@ static void modifiedCB(int pos, int nIns +@@ -2442,7 +2445,8 @@ static void modifiedCB(int pos, int nIns /* Trigger automatic backup if operation or character limits reached */ if (window->autoSave && (window->autoSaveCharCount > AUTOSAVE_CHAR_LIMIT || @@ -648,7 +648,7 @@ diff --quilt old/source/window.c new/source/window.c WriteBackupFile(window); window->autoSaveCharCount = 0; window->autoSaveOpCount = 0; -@@ -3431,6 +3435,7 @@ WindowInfo* CreateDocument(WindowInfo* s +@@ -3432,6 +3436,7 @@ WindowInfo* CreateDocument(WindowInfo* s window->undoOpCount = 0; window->undoMemUsed = 0; CLEAR_ALL_LOCKS(window->lockReasons); @@ -656,7 +656,7 @@ diff --quilt old/source/window.c new/source/window.c window->indentStyle = GetPrefAutoIndent(PLAIN_LANGUAGE_MODE); window->autoSave = GetPrefAutoSave(); window->saveOldVersion = GetPrefSaveOldVersion(); -@@ -3720,18 +3725,19 @@ void RefreshTabState(WindowInfo *win) +@@ -3721,18 +3726,19 @@ void RefreshTabState(WindowInfo *win) char labelString[MAXPATHLEN]; char *tag = XmFONTLIST_DEFAULT_TAG; unsigned char alignment; @@ -678,7 +678,7 @@ diff --quilt old/source/window.c new/source/window.c } /* Make the top document stand out a little more */ -@@ -3871,6 +3877,7 @@ void RefreshMenuToggleStates(WindowInfo +@@ -3872,6 +3878,7 @@ void RefreshMenuToggleStates(WindowInfo XmToggleButtonSetState(window->overtypeModeItem, window->overstrike, False); XmToggleButtonSetState(window->matchSyntaxBasedItem, window->matchSyntaxBased, False); XmToggleButtonSetState(window->readOnlyItem, IS_USER_LOCKED(window->lockReasons), False); @@ -686,7 +686,7 @@ diff --quilt old/source/window.c new/source/window.c XtSetSensitive(window->smartIndentItem, SmartIndentMacrosAvailable(LanguageModeName(window->languageMode))); -@@ -4439,6 +4446,7 @@ static void cloneDocument(WindowInfo *wi +@@ -4440,6 +4447,7 @@ static void cloneDocument(WindowInfo *wi window->fileChanged = orgWin->fileChanged; window->fileMissing = orgWin->fileMissing; window->lockReasons = orgWin->lockReasons; @@ -697,7 +697,7 @@ diff --quilt old/source/window.c new/source/window.c diff --quilt old/source/nedit.c new/source/nedit.c --- old/source/nedit.c +++ new/source/nedit.c -@@ -578,7 +578,7 @@ int main(int argc, char **argv) +@@ -579,7 +579,7 @@ int main(int argc, char **argv) IsServer = True; } @@ -718,7 +718,7 @@ diff --quilt old/source/server.c new/source/server.c CheckCloseDim(); } else { -@@ -414,7 +414,8 @@ static void processServerCommandString(c +@@ -415,7 +415,8 @@ static void processServerCommandString(c if (*doCommand == '\0') { if (window == NULL) { EditNewFile(findWindowOnDesktop(tabbed, currentDesktop), -- 2.11.4.GIT