add newTabTab.patch
[nedit-bw.git] / undo-all-in-macro-context.patch
blobea528666052efeed737eef3f7ce179c4f27c17d4
1 ---
3 source/undo.c | 7 +++++--
4 1 file changed, 5 insertions(+), 2 deletions(-)
6 diff --quilt old/source/undo.c new/source/undo.c
7 --- old/source/undo.c
8 +++ new/source/undo.c
9 @@ -209,8 +209,10 @@ void SaveUndoInformation(WindowInfo *win
10 ** than just the last character that the user typed. If the window
11 ** is currently in an unmodified state, don't accumulate operations
12 ** across the save, so the user can undo back to the unmodified state.
13 + **
14 + ** If this window is in macro xecution honor every modification as an undo.
16 - if (window->fileChanged) {
17 + if (window->fileChanged && window->macroCmdData == NULL) {
19 /* normal sequential character insertion */
20 if ( ((oldType == ONE_CHAR_INSERT || oldType == ONE_CHAR_REPLACE)
21 @@ -267,7 +269,8 @@ void SaveUndoInformation(WindowInfo *win
24 /* increment the operation count for the autosave feature */
25 - window->autoSaveOpCount++;
26 + if (window->macroCmdData == NULL)
27 + window->autoSaveOpCount++;
29 /* if the window is currently unmodified, remove the previous
30 restoresToSaved marker, and set it on this record */