diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-04 23:58:54 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-05 01:16:28 -0300 |
| commit | a3e38a8fd01c54b1fab8a7eaf225ac6147c74330 (patch) | |
| tree | a2f697389827f58bf6c6c69302b789bc770de889 /src/builtins.zig | |
| parent | 54b0c95fc5522b5ad48d857bb0a08c253c17ece3 (diff) | |
| download | pardes-a3e38a8fd01c54b1fab8a7eaf225ac6147c74330.tar.gz pardes-a3e38a8fd01c54b1fab8a7eaf225ac6147c74330.zip | |
File, terminal, edit: undo and redo are one undoStep(back) each, as Text.step already is, and their callers (normal, builtins, edit_cmd, file_watch, ninep/ctl's pager test, test/panes) say which way
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNAtZenFv4weoMD3cge
Diffstat (limited to 'src/builtins.zig')
| -rw-r--r-- | src/builtins.zig | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/builtins.zig b/src/builtins.zig index 1afba918..750000ba 100644 --- a/src/builtins.zig +++ b/src/builtins.zig @@ -1373,7 +1373,7 @@ pub const Undo = struct { pub fn run(c: Ctx) void { if (@import("edit_cmd.zig").busyOn(c.p, c.id)) return c.p.reportFailure(c.id, "Undo: " ++ @import("edit_cmd.zig").e_busy); if (c.pane.file) |f| if (f.history.undo_len == 0) return c.p.setMessage(c.id, "Undo: nothing to undo"); - edit.doUndo(c.p, &c.pane.body); + edit.undoStep(c.p, &c.pane.body, true); } }; @@ -1382,7 +1382,7 @@ pub const Redo = struct { pub fn run(c: Ctx) void { if (@import("edit_cmd.zig").busyOn(c.p, c.id)) return c.p.reportFailure(c.id, "Redo: " ++ @import("edit_cmd.zig").e_busy); if (c.pane.file) |f| if (f.history.redo_len == 0) return c.p.setMessage(c.id, "Redo: nothing to redo"); - edit.doRedo(c.p, &c.pane.body); + edit.undoStep(c.p, &c.pane.body, false); } }; |
