diff options
| -rw-r--r-- | include/SciLexer.h | 3 | ||||
| -rw-r--r-- | src/CellBuffer.cxx | 15 | 
2 files changed, 9 insertions, 9 deletions
| diff --git a/include/SciLexer.h b/include/SciLexer.h index 1e6542219..3e0ad31b4 100644 --- a/include/SciLexer.h +++ b/include/SciLexer.h @@ -47,12 +47,11 @@  #define SCE_C_WORD 5  #define SCE_C_STRING 6  #define SCE_C_CHARACTER 7 -#define SCE_C_PUNTUATION 8 +#define SCE_C_UUID 8  #define SCE_C_PREPROCESSOR 9  #define SCE_C_OPERATOR 10  #define SCE_C_IDENTIFIER 11  #define SCE_C_STRINGEOL 12 -#define SCE_C_UUID 13  // Lexical states for SCLEX_HTML, SCLEX_xML  #define SCE_H_DEFAULT 0 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;  } | 
