diff options
author | Neil <nyamatongwe@gmail.com> | 2024-02-27 15:34:01 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2024-02-27 15:34:01 +1100 |
commit | c596111b25cc19cc31945b28dbc00a57f9172689 (patch) | |
tree | 6bb71b91dd3bf3574affddd7dee71c458af1bbdc /src/UndoHistory.h | |
parent | 6c1c08e08029f3daeba6822dec4487e1cddae445 (diff) | |
download | scintilla-mirror-c596111b25cc19cc31945b28dbc00a57f9172689.tar.gz |
Restore change history to the extent possible when restoring undo history.
Diffstat (limited to 'src/UndoHistory.h')
-rw-r--r-- | src/UndoHistory.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/UndoHistory.h b/src/UndoHistory.h index 5ddc03593..90b2860a7 100644 --- a/src/UndoHistory.h +++ b/src/UndoHistory.h @@ -80,7 +80,7 @@ class UndoHistory { int undoSequenceDepth = 0; int savePoint = 0; int tentativePoint = -1; - std::optional<int> detach; + std::optional<int> detach; // Never set if savePoint set (>= 0) std::unique_ptr<ScrapStack> scraps; struct actPos { int act; size_t position; }; std::optional<actPos> memory; @@ -107,7 +107,7 @@ public: void SetSavePoint() noexcept; bool IsSavePoint() const noexcept; bool BeforeSavePoint() const noexcept; - bool BeforeOrAtSavePoint() const noexcept; + bool PreviousBeforeSavePoint() const noexcept; bool BeforeReachableSavePoint() const noexcept; bool AfterSavePoint() const noexcept; @@ -139,11 +139,11 @@ public: /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. bool CanUndo() const noexcept; - int StartUndo() noexcept; + int StartUndo() const noexcept; Action GetUndoStep() const noexcept; void CompletedUndoStep() noexcept; bool CanRedo() const noexcept; - int StartRedo() noexcept; + int StartRedo() const noexcept; Action GetRedoStep() const noexcept; void CompletedRedoStep() noexcept; }; |