aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/UndoHistory.cxx
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2024-02-27 15:34:01 +1100
committerNeil <nyamatongwe@gmail.com>2024-02-27 15:34:01 +1100
commitc596111b25cc19cc31945b28dbc00a57f9172689 (patch)
tree6bb71b91dd3bf3574affddd7dee71c458af1bbdc /src/UndoHistory.cxx
parent6c1c08e08029f3daeba6822dec4487e1cddae445 (diff)
downloadscintilla-mirror-c596111b25cc19cc31945b28dbc00a57f9172689.tar.gz
Restore change history to the extent possible when restoring undo history.
Diffstat (limited to 'src/UndoHistory.cxx')
-rw-r--r--src/UndoHistory.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/UndoHistory.cxx b/src/UndoHistory.cxx
index aac802dfd..c71551e60 100644
--- a/src/UndoHistory.cxx
+++ b/src/UndoHistory.cxx
@@ -383,12 +383,12 @@ bool UndoHistory::BeforeSavePoint() const noexcept {
return (savePoint < 0) || (savePoint > currentAction);
}
-bool UndoHistory::BeforeOrAtSavePoint() const noexcept {
+bool UndoHistory::PreviousBeforeSavePoint() const noexcept {
return (savePoint < 0) || (savePoint >= currentAction);
}
bool UndoHistory::BeforeReachableSavePoint() const noexcept {
- return (savePoint > 0) && !detach && (savePoint > currentAction);
+ return (savePoint > 0) && (savePoint > currentAction);
}
bool UndoHistory::AfterSavePoint() const noexcept {
@@ -544,7 +544,7 @@ bool UndoHistory::CanUndo() const noexcept {
return (currentAction > 0) && (actions.SSize() != 0);
}
-int UndoHistory::StartUndo() noexcept {
+int UndoHistory::StartUndo() const noexcept {
assert(currentAction >= 0);
// Count the steps in this action
@@ -584,7 +584,7 @@ bool UndoHistory::CanRedo() const noexcept {
return actions.SSize() > currentAction;
}
-int UndoHistory::StartRedo() noexcept {
+int UndoHistory::StartRedo() const noexcept {
// Count the steps in this action
if (currentAction >= actions.SSize()) {