From 5af1c055d1a248960e1855c200d12d2bb1425422 Mon Sep 17 00:00:00 2001 From: dail8859 Date: Thu, 10 Nov 2016 09:50:20 -0500 Subject: [PATCH] Correctly identify when a macro is playing In certain cases (e.g. running the current macro until the end of file) and auto-completion and auto-indentation was not getting turned off, causing certain commands to get interpreted incorrectly. Closes #2553, Closes #2545, Closes #2556 --- PowerEditor/src/NppCommands.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 093507db9..61102284f 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -45,6 +45,7 @@ void Notepad_plus::macroPlayback(Macro macro) { LongRunningOperation op; + _playingBackMacro = true; _pEditView->execute(SCI_BEGINUNDOACTION); for (Macro::iterator step = macro.begin(); step != macro.end(); ++step) @@ -56,6 +57,7 @@ void Notepad_plus::macroPlayback(Macro macro) } _pEditView->execute(SCI_ENDUNDOACTION); + _playingBackMacro = false; } void Notepad_plus::command(int id) @@ -860,9 +862,7 @@ void Notepad_plus::command(int id) case IDM_MACRO_PLAYBACKRECORDEDMACRO: if (!_recordingMacro) // if we're not currently recording, then playback the recorded keystrokes { - _playingBackMacro = true; macroPlayback(_macro); - _playingBackMacro = false; } break;