Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Nudges in the same direction should be combined in history

Open Keavon opened this issue 9 months ago • 1 comments

Any number of nudges (with the arrow key) in the same direction should be combined into the same history step. So if you nudge 53px to the right with Shift+right arrow 5 times and right arrow 3 times, we should be able to use undo one instead of 8 times to return to where we were. Then switching directions (or doing anything else that creates a history step) should become a new point in history.

Keavon avatar Apr 25 '25 03:04 Keavon

The current history system simply clones the document. This is not ideal as it is very wasteful of memory as well as making it difficult to track what happened (for example in this case to merge history steps).

I suggest that we should refactor the history system before doing this since otherwise the temporary code will likely become very unreliable and messy.

0HyperCube avatar Apr 30 '25 19:04 0HyperCube