diff options
Diffstat (limited to 'src/UndoHistory.cxx')
-rw-r--r-- | src/UndoHistory.cxx | 2 |
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++; |