Skip to content

Add undo/redo support for the pattern editor - #85

Closed
tema5002 wants to merge 0 commit into
8bitbubsy:masterfrom
tema5002:master
Closed

Add undo/redo support for the pattern editor#85
tema5002 wants to merge 0 commit into
8bitbubsy:masterfrom
tema5002:master

Conversation

@tema5002

@tema5002 tema5002 commented Aug 21, 2026

Copy link
Copy Markdown

This pull request introduces a ring-buffer-based undo system (ft2_undo.c/h) covering: note edits, pattern insert/delete/length changes, song length/loop start, BPM/speed, channel count and global volume.
Related edits across the pattern editor, position editor, and trim tool now push undo records for their changes, grouped with undoBeginGroup/EndGroup where an action touches more than one cell.
Bound to Ctrl+U and Ctrl+Q in the keyboard handler.

Also a few minor changes I wouldn't open a small not-too-useful PR for:

  • Make Linux build scripts executable by default (avoids chmod +x <file.sh>) and able to run in just POSIX sh, not just Bash.
  • Add a home button to diskop. that redirects to the current user's home directory when compiling for MacOS/Linux. Also removed the "/.." directory entry.

The help section dedicated to keybinds was not updated.
From what I've tried it works perfectly fine, everything tested on a GNU/Linux system.

If something needs to be done (like renaming some functions) I can push a follow-up commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant