diff options
| author | nyamatongwe <unknown> | 2001-01-29 10:00:30 +0000 | 
|---|---|---|
| committer | nyamatongwe <unknown> | 2001-01-29 10:00:30 +0000 | 
| commit | e680417ff6ee0f18cfd4d522eb358073db73c40a (patch) | |
| tree | 60742ae45ba764d54bc8b988401e6efb9458894f /src/CellBuffer.cxx | |
| parent | e5da2afe2454033576cdee2a44f4b4a25ed21fe6 (diff) | |
| download | scintilla-mirror-e680417ff6ee0f18cfd4d522eb358073db73c40a.tar.gz | |
Fixed problem where BeginUndoAction and EndUndoAction were in wrong order.
Made both the effects of backspace and delete keys be coalesced together
into undo actions.
Diffstat (limited to 'src/CellBuffer.cxx')
| -rw-r--r-- | src/CellBuffer.cxx | 13 | 
1 files changed, 9 insertions, 4 deletions
| diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 85ecf7d44..690e84c94 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -450,10 +450,6 @@ void UndoHistory::AppendAction(actionType at, int position, char *data, int leng  				currentAction++;  			} else if (currentAction == savePoint) {  				currentAction++; -			} else if ((at == removeAction) && -			           ((position + lengthData * 2) != actPrevious.position)) { -				// Removals must be at same position to coalesce -				currentAction++;  			} else if ((at == insertAction) &&  			           (position != (actPrevious.position + actPrevious.lenData*2))) {  				// Insertions must be immediately after to coalesce @@ -461,6 +457,15 @@ void UndoHistory::AppendAction(actionType at, int position, char *data, int leng              } else if (!actions[currentAction].mayCoalesce) {  				// Not allowed to coalesce if this set  				currentAction++; +            } else if ((at == removeAction) && (lengthData == 2)) { +                if ((position + lengthData * 2) == actPrevious.position) { +                    ; // Backspace -> OK +                } else if (position == actPrevious.position) { +                    ; // Delete -> OK +                } else { +				    // Removals must be at same position to coalesce +				    currentAction++; +                }  			} else {  				//Platform::DebugPrintf("action coalesced\n");  			} | 
