diff options
| author | nyamatongwe <devnull@localhost> | 2001-07-17 01:21:37 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2001-07-17 01:21:37 +0000 | 
| commit | 828a9b0127163b684a5f30638690655d3fb64df1 (patch) | |
| tree | b7b12d914b559da213d17487b78be16cbccaa896 /src/CellBuffer.cxx | |
| parent | 3e363d2d882b7682799972049f57715b775bc409 (diff) | |
| download | scintilla-mirror-828a9b0127163b684a5f30638690655d3fb64df1.tar.gz | |
Changed caret to start in off and inactive state.
Removed extraneous tests in EnsureUndoRoom.
Diffstat (limited to 'src/CellBuffer.cxx')
| -rw-r--r-- | src/CellBuffer.cxx | 29 | 
1 files changed, 13 insertions, 16 deletions
| diff --git a/src/CellBuffer.cxx b/src/CellBuffer.cxx index 10e0a1859..8bdb3d104 100644 --- a/src/CellBuffer.cxx +++ b/src/CellBuffer.cxx @@ -418,22 +418,19 @@ UndoHistory::~UndoHistory() {  }  void UndoHistory::EnsureUndoRoom() { -	//Platform::DebugPrintf("%% %d action %d %d %d\n", at, position, length, currentAction); -	if (currentAction >= 2) { -		// Have to test that there is room for 2 more actions in the array -		// as two actions may be created by this function -		if (currentAction >= (lenActions - 2)) { -			// Run out of undo nodes so extend the array -			int lenActionsNew = lenActions * 2; -			Action *actionsNew = new Action[lenActionsNew]; -			if (!actionsNew) -				return ; -			for (int act = 0; act <= currentAction; act++) -				actionsNew[act].Grab(&actions[act]); -			delete []actions; -			lenActions = lenActionsNew; -			actions = actionsNew; -		} +	// Have to test that there is room for 2 more actions in the array +	// as two actions may be created by the calling function +	if (currentAction >= (lenActions - 2)) { +		// Run out of undo nodes so extend the array +		int lenActionsNew = lenActions * 2; +		Action *actionsNew = new Action[lenActionsNew]; +		if (!actionsNew) +			return ; +		for (int act = 0; act <= currentAction; act++) +			actionsNew[act].Grab(&actions[act]); +		delete []actions; +		lenActions = lenActionsNew; +		actions = actionsNew;  	}  } | 
