diff options
-rw-r--r-- | src/Editor.cxx | 1 |
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); |