diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/panes.zig | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/panes.zig b/test/panes.zig index b111f5d1..f85daab3 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -1213,7 +1213,7 @@ test "terminal edits and undo survive partial history clearing and whole-screen try std.testing.expectEqualStrings("edit one\nedit two", snapshot.ovl.?.text); } try std.testing.expectEqual(@as(usize, 2), pane.terminal.?.vt.screens.active.pages.countTrackedPins()); - panes.terminal.undo(p, pane); + panes.terminal.undoStep(p, pane, true); try std.testing.expectEqualStrings("edit one\nedit two", pane.ovl.?.text); try std.testing.expectEqual(expected, pane.ovl.?.row); } @@ -1430,24 +1430,24 @@ test "file history owns bounded snapshot storage without per-edit bookkeeping al const current = file.content; failing.fail_index = failing.alloc_index; panes.File.pushUndo(p, pane); - panes.File.undo(p, pane); + panes.File.undoStep(p, pane, true); try std.testing.expectEqual(current.ptr, file.content.ptr); try std.testing.expectEqual(pardes.memory.limits.undo_max, history.undo_len); try std.testing.expectEqual(@as(usize, 0), history.redo_len); failing.fail_index = std.math.maxInt(usize); const before = failing.alloc_index; - panes.File.undo(p, pane); + panes.File.undoStep(p, pane, true); try std.testing.expectEqual(before + 2, failing.alloc_index); try std.testing.expectEqual(@as(usize, 1), file.line_starts.len); try std.testing.expectEqual(@as(usize, 1), history.redo_len); const undone = file.content; failing.fail_index = failing.alloc_index; - panes.File.redo(p, pane); + panes.File.undoStep(p, pane, false); try std.testing.expectEqual(undone.ptr, file.content.ptr); try std.testing.expectEqual(@as(usize, 1), history.redo_len); failing.fail_index = std.math.maxInt(usize); const before_redo = failing.alloc_index; - panes.File.redo(p, pane); + panes.File.undoStep(p, pane, false); try std.testing.expectEqual(before_redo + 2, failing.alloc_index); try std.testing.expectEqual(pardes.memory.limits.undo_max, history.undo_len); try std.testing.expectEqual(@as(usize, 0), history.redo_len); |
