aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2025-02-01 08:25:29 +1100
committerNeil <nyamatongwe@gmail.com>2025-02-01 08:25:29 +1100
commit97691047e0c13b92639d340ee9f34dde67941e18 (patch)
tree0924945ce24dd0e7ac330ba8477dca3728308d93
parent95ec7a380057b0b46a746a88613df54041b6ce9e (diff)
downloadscintilla-mirror-97691047e0c13b92639d340ee9f34dde67941e18.tar.gz
Reconnect to document's undo selection history after switching documents when
performing undo or redo.
-rw-r--r--src/Editor.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx
index d63f43f3f..0d1a221cd 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -2399,6 +2399,7 @@ void Editor::SelectAll() {
}
void Editor::RestoreSelection(Sci::Position newPos, UndoRedo history) {
+ EnsureModelState();
if ((undoSelectionHistoryOption == UndoSelectionHistoryOption::Enabled) && modelState) {
// Undo wants the element after the current as it just undid it
const int index = pdoc->UndoCurrent() + (history == UndoRedo::undo ? 1 : 0);