From 97691047e0c13b92639d340ee9f34dde67941e18 Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 1 Feb 2025 08:25:29 +1100 Subject: Reconnect to document's undo selection history after switching documents when performing undo or redo. --- src/Editor.cxx | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); -- cgit v1.2.3