Undo actions are necessarily generated when CC makes no change?
@@ -1435,7 +1518,8 @@
itemText << _T('>');
}
- control->ReplaceTarget(itemText);
+ if (control->GetTextRange(startPos, curPos) != itemText)
+ control->ReplaceTarget(itemText);
control->GotoPos(startPos + itemText.Length());
if (needReparse)
The current system can create two undo actions when completing a PP command (1: delete rest of line, 2: insert new token), this is now condensed to one step.
The current system also will create an undo action if the resulting text is no different than what it first was. For example, open a source file, click on a token, press Ctrl-Space (call CC), and select the same token from the list. The current line looks no different, but an undo action is generated, and the line/file is marked as modified.