diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 08:09:08 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:16 -0300 |
| commit | f7e3441698a4621bec0d7c14eb45303753ffbead (patch) | |
| tree | 14ed04f81a0fc7aa7e07a44e4b4c413b940b3901 /test/panes.zig | |
| parent | 72c84bd7206bba5e2323c2e7f12f2458405e800d (diff) | |
| download | pardes-f7e3441698a4621bec0d7c14eb45303753ffbead.tar.gz pardes-f7e3441698a4621bec0d7c14eb45303753ffbead.zip | |
A rename alone does not make a pane dirty
Any rename marked the pane dirty (saved revision one back), while the
guards ask only whether its text was ever edited: /index said dirty for a
pane Exit let go without asking. The name is no edit now, so /index, the
guards and Restore agree; Save writes under the new name all the same.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/panes.zig')
| -rw-r--r-- | test/panes.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/panes.zig b/test/panes.zig index 1988fe16..1ca33053 100644 --- a/test/panes.zig +++ b/test/panes.zig @@ -1622,7 +1622,8 @@ test "pane filename drafts commit and cancel without changing body or command ta try std.testing.expectEqualStrings(tail, pardes.tagline.curTail(pane)); while (p.nextEffect()) |effect| try std.testing.expect(std.meta.activeTag(effect) != .save_file); } - try std.testing.expect(pane.file.?.revision != pane.file.?.saved_revision); + // A name alone is no edit: the pane stays clean. + try std.testing.expect(pane.file.?.revision == pane.file.?.saved_revision); } test "pane filename grapheme edits and invalid empty commits preserve the buffer" { |
