From eabf5d76c5f141548757a9bd06925f19d83fab52 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sun, 22 Jan 2023 15:55:30 +0100 Subject: [PATCH] Fix cannot undo "Block Uncomment" command in one shot Fix #12830 --- PowerEditor/src/Notepad_plus.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 7b0d2304a..660d098de 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -8270,6 +8270,8 @@ bool Notepad_plus::undoStreamComment(bool tryBlockComment) size_t start_comment_length = start_comment.length(); size_t end_comment_length = end_comment.length(); + _pEditView->execute(SCI_BEGINUNDOACTION); + // do as long as stream-comments are within selection do { @@ -8418,6 +8420,8 @@ bool Notepad_plus::undoStreamComment(bool tryBlockComment) } } while (1); //do as long as stream-comments are within selection + + _pEditView->execute(SCI_ENDUNDOACTION); } void Notepad_plus::monitoringStartOrStopAndUpdateUI(Buffer* pBuf, bool isStarting)