summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-29 08:09:08 -0300
committerGabriel Schneider <[email protected]>2026-10-01 00:12:16 -0300
commitf7e3441698a4621bec0d7c14eb45303753ffbead (patch)
tree14ed04f81a0fc7aa7e07a44e4b4c413b940b3901 /test
parent72c84bd7206bba5e2323c2e7f12f2458405e800d (diff)
downloadpardes-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')
-rw-r--r--test/gui-goldens.txt2
-rw-r--r--test/panes.zig3
2 files changed, 3 insertions, 2 deletions
diff --git a/test/gui-goldens.txt b/test/gui-goldens.txt
index 01bdfc7c..93e77764 100644
--- a/test/gui-goldens.txt
+++ b/test/gui-goldens.txt
@@ -5,7 +5,7 @@
05-body-selection 96a158adac982f4141526d10956e19828632edc0f6f60d1161d1353e34797118
06-tag-focus-selection 94aff8499a6e6f399761ffdd56369d526fbe65232eb21c88addd12973af611aa
07-prompt-notice 041603b841605b0a9456cbbb9b3e06e219b0a08a58e2d38229e1c81366577a87
-08-wide-glyph-edges 94b0beb7cc2f2a09259f4f7d57999001ef75ed53ea210a65a1510404bd161af9
+08-wide-glyph-edges 4f15245cb2e14f4190940a79c61751bbb6efbf21c1e3ab423fb1469e0466697e
09-collapsed-focus-tint 1d0e6e4b371bc3b2bba96d9177b91f240fa4bef38c62470dc078fa9feed119ac
10-tagbottom f7175dfb338b75c5ac3457c8422dc0e352c46d51b2c52533ce32ef143fcf6c6b
12-multiline-tag ddd7d775a246e91b88f0eff98b6f9bea8aa5d63dbfbe931bd830ccb9086bd5c4
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" {