Add new command, executing it if desired. The new command will be merged with the previous command if merge is TRUE and we're not at a marked position and the commands are mergeable. Otherwise the new command will be appended after the last undo command in the currently active undo group. If the new command is successfully merged, it will be deleted. Furthermore, all redo commands will be deleted since it is no longer possible to redo from this point.
|