From a578f4a61b6565b2c69c57e9ccaad34e58a95edd Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 25 Mar 2000 02:47:21 +0000 Subject: FIxed problem with first modification sometimes not looking dirty. Remonved unused 'PUNTUATION' lexclass. --- src/CellBuffer.cxx | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/CellBuffer.cxx') diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 4d667dcf4..b9fe69660 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -404,9 +404,9 @@ void UndoHistory::AppendAction(actionType at, int position, char *data, int leng Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, lengthData, currentAction); Platform::DebugPrintf("^ %d action %d %d\n", actions[currentAction - 1].at, actions[currentAction - 1].position, actions[currentAction - 1].lenData); - if (0 == undoSequenceDepth) { + if (currentAction >= 1) { + if (0 == undoSequenceDepth) { // Top level actions may not always be coalesced - if (currentAction >= 2) { Action &actPrevious = actions[currentAction - 1]; // See if current action can be coalesced into previous action // Will work if both are inserts or deletes and position is same @@ -427,13 +427,13 @@ void UndoHistory::AppendAction(actionType at, int position, char *data, int leng } } else { currentAction++; - } + } + } else { + currentAction++; } actions[currentAction].Create(at, position, data, lengthData); - //if ((collectingUndo == undoCollectAutoStart) && (0 == undoSequenceDepth)) { - currentAction++; - actions[currentAction].Create(startAction); - //} + currentAction++; + actions[currentAction].Create(startAction); maxAction = currentAction; } @@ -470,6 +470,7 @@ void UndoHistory::DeleteUndoHistory() { actions[i].Destroy(); maxAction = 0; currentAction = 0; + actions[currentAction].Create(startAction); savePoint = 0; } -- cgit v1.2.3