diff options
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; |
