diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-01 21:55:57 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 21:55:57 -0300 |
| commit | b55cb01d2777760ed79b545dfca7115837591577 (patch) | |
| tree | caf8fa6366d5b0612f5a79718a62ed798f87424f /src/ninep | |
| parent | 97efe2d711b8b357157db2cb3402c3488064117a (diff) | |
| download | pardes-b55cb01d2777760ed79b545dfca7115837591577.tar.gz pardes-b55cb01d2777760ed79b545dfca7115837591577.zip | |
An undo step keeps no copy of the name: History keeps each name once, at the rename that ends it, and a step its generation, so typing allocates a snapshot and nothing more (follows prwqwwxt); a rename of one Zerox twin is logged for each twin
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/ninep')
| -rw-r--r-- | src/ninep/pane.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ninep/pane.zig b/src/ninep/pane.zig index 981c2b0e..3b70d62f 100644 --- a/src/ninep/pane.zig +++ b/src/ninep/pane.zig @@ -982,7 +982,8 @@ pub fn nameBuffer(p: *Pardes, id: usize, full: []const u8, preserve_tag: bool) ! if (std.mem.indexOfAny(u8, full, "\x00\n") != null) return error.InvalidName; if (std.mem.eql(u8, f.path, full)) return; const copy = try p.gpa.dupe(u8, full); - p.gpa.free(f.path); + // The name it ends is kept for an undo back across this rename. + panes.File.noteRenamed(p.gpa, f.history, f.path); f.path = copy; if (panes.Output.fileTraits(f.output).saves) { f.output = null; |
