redo
All checks were successful
Test Rust project / test (ubuntu-latest, stable) (push) Successful in 43s

Undo / Redo are currently bound to Pageup/down. This is ideally temporary, I just need to figure out ctrl+r for redo. "u" is also bound to undo as it should be
This commit is contained in:
2026-02-07 20:46:22 -07:00
parent c2e0661a45
commit d5d58694bb
2 changed files with 13 additions and 3 deletions

View File

@@ -243,7 +243,7 @@ impl Grid {
self.current_grid = self.current_grid.saturating_sub(1);
}
pub fn redo(&mut self) {
self.current_grid += 1;
self.current_grid = min(self.grid_history.len() - 1, self.current_grid + 1);
}
pub fn transact_on_grid<F>(&mut self, mut action: F)