]> git.lyx.org Git - features.git/commit
Improve undo of consecutive insertions/deletions
authorJean-Marc Lasgouttes <lasgouttes@lyx.org>
Thu, 12 Mar 2015 13:47:39 +0000 (14:47 +0100)
committerJean-Marc Lasgouttes <lasgouttes@lyx.org>
Mon, 16 Mar 2015 17:31:22 +0000 (18:31 +0100)
commited3d9544a331a7c28730089e7b059eea592584c4
tree99e8d78dd289f637010848178ac64375fbd5c1f2
parentd2ab8e1b651e6adc73974ea026435d1c9b4f3749
Improve undo of consecutive insertions/deletions

The old scheme was:
 * multiple insertions are undone by groups of 20
 * multiple deletions are undone in one big block

The new scheme is to stop merging undo elements after 2 seconds of elapsed time.

Moreover, the merging of undo elements stops when the cursor has moved. Potentially, this could allow to remove many of the finishUndo() calls.

Fixes bug #9204.
src/Text.cpp
src/Text.h
src/Undo.cpp