diff options
Diffstat (limited to 'src/UndoHistory.cxx')
-rw-r--r-- | src/UndoHistory.cxx | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/src/UndoHistory.cxx b/src/UndoHistory.cxx index bc1a4d36a..88e931ea9 100644 --- a/src/UndoHistory.cxx +++ b/src/UndoHistory.cxx @@ -101,15 +101,8 @@ const char *ScrapStack::TextAt(size_t position) const noexcept { // Sequences that look like typing or deletion are coalesced into a single user operation. UndoHistory::UndoHistory() { - actions.resize(3); - maxAction = 0; - currentAction = 0; - undoSequenceDepth = 0; - savePoint = 0; - tentativePoint = -1; scraps = std::make_unique<ScrapStack>(); - actions[currentAction].Create(ActionType::start); } @@ -287,8 +280,7 @@ int UndoHistory::TentativeSteps() noexcept { currentAction--; if (tentativePoint >= 0) return currentAction - tentativePoint; - else - return -1; + return -1; } bool UndoHistory::CanUndo() const noexcept { |