tildearrow / furnace

a multi-system chiptune tracker compatible with DefleMask modules
GNU General Public License v2.0
2.65k stars 209 forks source link

Add cursor undo/redo actions #2107

Closed alederer closed 2 months ago

alederer commented 2 months ago

Feature: A cursor jump point undo/redo stack is maintained separately from the main undo/redo stacks. Cursor jump points take you to a cell position in a particular order (index) in a particular subsong (index). Cursor jump points are stored onto the undo stack when "major cursor movement occurs".

Currently cursor jump points are stored in the following conditions (you can just search for makeCursorUndo()):

demo

https://github.com/user-attachments/assets/229f26f2-d166-42c1-a621-128520ad4946

I also added a handy cursor undo/redo stack visualizer to the Debug menu

Screenshot 2024-08-24 at 6 09 21 PM

Status: I'm finding this super useful (i have it mapped to ctrl-o and ctrl-i like vim/vscode), but also assume it'll need some tweaking over time, to identify the most useful/consistent makeCursorUndo() conditions, and in terms of edge cases when orders or subsongs are destroyed/reordered (i don't think we'll see crashes, but could have some weird scenarios?)