summaryrefslogtreecommitdiff
path: root/src/tagline.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/tagline.zig')
-rw-r--r--src/tagline.zig11
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();
}