From fe074f193e72d030447b96a231846a24b17a41ac Mon Sep 17 00:00:00 2001 From: Neil Date: Sat, 9 Mar 2024 09:02:04 +1100 Subject: Bug [#2432]. Fix redo failure. --- src/UndoHistory.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') 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++; -- cgit v1.2.3