From f548199a31d4d6f9e578e563fc3f75a41f689412 Mon Sep 17 00:00:00 2001 From: Bert Wesarg Date: Wed, 1 Jul 2009 17:41:08 +0200 Subject: [PATCH] add undo-all-in-macro-context.patch Patch: +undo-all-in-macro-context.patch --- series | 1 + undo-all-in-macro-context.patch | 30 ++++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 undo-all-in-macro-context.patch diff --git a/series b/series index 64e78ad..f06f799 100644 --- a/series +++ b/series @@ -152,3 +152,4 @@ ewmh-raise.diff saveSearchHistory.patch saveSearchHistory-fixes.patch GTsAndAtsInMenus.diff +undo-all-in-macro-context.patch diff --git a/undo-all-in-macro-context.patch b/undo-all-in-macro-context.patch new file mode 100644 index 0000000..ea52866 --- /dev/null +++ b/undo-all-in-macro-context.patch @@ -0,0 +1,30 @@ +--- + + source/undo.c | 7 +++++-- + 1 file changed, 5 insertions(+), 2 deletions(-) + +diff --quilt old/source/undo.c new/source/undo.c +--- old/source/undo.c ++++ new/source/undo.c +@@ -209,8 +209,10 @@ void SaveUndoInformation(WindowInfo *win + ** than just the last character that the user typed. If the window + ** is currently in an unmodified state, don't accumulate operations + ** across the save, so the user can undo back to the unmodified state. ++ ** ++ ** If this window is in macro xecution honor every modification as an undo. + */ +- if (window->fileChanged) { ++ if (window->fileChanged && window->macroCmdData == NULL) { + + /* normal sequential character insertion */ + if ( ((oldType == ONE_CHAR_INSERT || oldType == ONE_CHAR_REPLACE) +@@ -267,7 +269,8 @@ void SaveUndoInformation(WindowInfo *win + } + + /* increment the operation count for the autosave feature */ +- window->autoSaveOpCount++; ++ if (window->macroCmdData == NULL) ++ window->autoSaveOpCount++; + + /* if the window is currently unmodified, remove the previous + restoresToSaved marker, and set it on this record */ -- 2.11.4.GIT