diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 19:41:44 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | e0b3f11f008e54174d5169147b8cf5dac56e915a (patch) | |
| tree | 888e1cfb21a381b599ae59f1b1942572aba54fa9 /src/tagline.zig | |
| parent | fb87946e09bf33c0fe663ccba6db14a63e7cfda4 (diff) | |
| download | pardes-e0b3f11f008e54174d5169147b8cf5dac56e915a.tar.gz pardes-e0b3f11f008e54174d5169147b8cf5dac56e915a.zip | |
A tag no longer marks an unsaved file with *: the grip shows it
The grip button now shows a pane's unsaved text in every state, as acme's modbutton does, and acme's tag has no asterisk. The computed prefix is the name alone, so tag reads, event offsets that count the path and the tag's text lose the " *". dirty, index's flag and the refuse-once guards are unchanged; a dump from before still restores its tags past the old mark.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/tagline.zig')
| -rw-r--r-- | src/tagline.zig | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/tagline.zig b/src/tagline.zig index 858bb9b1..d0d0b413 100644 --- a/src/tagline.zig +++ b/src/tagline.zig @@ -23,6 +23,8 @@ pub const context_pane_tail = file_pane_tail ++ " TreeContext"; pub const locations_pane_tail = file_pane_tail ++ " LocationsConfig"; pub const terminal_pane_tail = " " ++ config.terminal_pane_builtins_str; pub const command_pane_tail = " " ++ config.command_pane_builtins_str; +/// The mark a tag carried after an unsaved file's name before the grip +/// showed it; a dump from then still has it in its saved tags. const dirty_marker = " *"; pub const legacy_pane_tail = " Del"; pub const legacy_file_pane_tail = " Save Del"; @@ -134,12 +136,9 @@ pub fn pathPrefix(arena: std.mem.Allocator, pane: *Pane) ![]const u8 { var idbuf: [48]u8 = undefined; return std.fmt.allocPrint(arena, "{s} {s}", .{ pane.cwdSlice(), exec.replId(&idbuf, pane) }); } - if (pane.file) |f| { - const name = if (pane.prompt == .name) pane.input.own orelse f.path else f.path; - if (panes.Output.fileTraits(f.output).saves and f.revision != f.saved_revision) - return std.fmt.allocPrint(arena, "{s}{s}", .{ name, dirty_marker }); - return name; - } + // Unsaved text shows on the grip, as acme's modbutton does, not as a + // mark in the text: the prefix is the name alone. + if (pane.file) |f| return if (pane.prompt == .name) pane.input.own orelse f.path else f.path; return pane.cwdSlice(); } |
