aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2024-03-09 09:02:04 +1100
committerNeil <nyamatongwe@gmail.com>2024-03-09 09:02:04 +1100
commitfe074f193e72d030447b96a231846a24b17a41ac (patch)
tree3a6418a63dd4047b3f1d45e6db437f82699a45e3 /src
parent212219da82d0a430dbf4eac1528056440f07940c (diff)
downloadscintilla-mirror-fe074f193e72d030447b96a231846a24b17a41ac.tar.gz
Bug [#2432]. Fix redo failure.
Diffstat (limited to 'src')
-rw-r--r--src/UndoHistory.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/UndoHistory.cxx b/src/UndoHistory.cxx
index 66b6e62be..daae97ad5 100644
--- a/src/UndoHistory.cxx
+++ b/src/UndoHistory.cxx
@@ -315,6 +315,8 @@ const char *UndoHistory::AppendAction(ActionType at, Sci::Position position, con
const char *dataNew = lengthData ? scraps->Push(data, lengthData) : nullptr;
if (currentAction >= actions.SSize()) {
actions.PushBack();
+ } else {
+ actions.Truncate(currentAction+1);
}
actions.Create(currentAction, at, position, lengthData, mayCoalesce);
currentAction++;