From 6c1c08e08029f3daeba6822dec4487e1cddae445 Mon Sep 17 00:00:00 2001 From: Neil Date: Sun, 18 Feb 2024 08:30:04 +1100 Subject: Restore change history when restoring undo history. --- src/UndoHistory.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/UndoHistory.cxx') diff --git a/src/UndoHistory.cxx b/src/UndoHistory.cxx index 810cd9a14..aac802dfd 100644 --- a/src/UndoHistory.cxx +++ b/src/UndoHistory.cxx @@ -474,6 +474,10 @@ Sci::Position UndoHistory::Position(int action) const noexcept { return actions.positions.SignedValueAt(action); } +Sci::Position UndoHistory::Length(int action) const noexcept { + return actions.lengths.SignedValueAt(action); +} + std::string_view UndoHistory::Text(int action) noexcept { // Assumes first call after any changes is for action 0. // TODO: may need to invalidate memory in other circumstances -- cgit v1.2.3