aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UndoHistory.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2025-01-22 21:34:54 +1100
committerNeil <nyamatongwe@gmail.com>2025-01-22 21:34:54 +1100
commit3de9d37c7b8f4501558d309ada718dc52533e94c (patch)
treece87afaff43a86c26c562fefcf0c9a5ea409ef6b /src/UndoHistory.cxx
parentbac32d7fde0b1d052ac9e926c6b3c96afe39bcfd (diff)
downloadscintilla-mirror-3de9d37c7b8f4501558d309ada718dc52533e94c.tar.gz
Bug [#1224]. Remember selection in undo history. SCI_SETSELECTIONUNDOHISTORY.
Diffstat (limited to 'src/UndoHistory.cxx')
-rw-r--r--src/UndoHistory.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/UndoHistory.cxx b/src/UndoHistory.cxx
index c0d7ba5f2..29a80c6d1 100644
--- a/src/UndoHistory.cxx
+++ b/src/UndoHistory.cxx
@@ -354,6 +354,14 @@ int UndoHistory::UndoSequenceDepth() const noexcept {
return undoSequenceDepth;
}
+bool UndoHistory::AfterUndoSequenceStart() const noexcept {
+ if (currentAction == 0) {
+ return false;
+ }
+ // Count back to last sequence start?
+ return !actions.AtStart(currentAction-1);
+}
+
void UndoHistory::DropUndoSequence() noexcept {
undoSequenceDepth = 0;
}