From f3618a5a3151e02db2c1e2280ab42d48c35eeba9 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 1 Jul 2026 17:59:23 -0300 Subject: tagline is editable now --- term.zig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'term.zig') diff --git a/term.zig b/term.zig index 13b4ff85..27dbfef2 100644 --- a/term.zig +++ b/term.zig @@ -150,6 +150,21 @@ edits: [MAX_EDITS]Edit = @splat(.{}), ed_undo: std.ArrayList(EditSnap) = .empty, ed_redo: std.ArrayList(EditSnap) = .empty, +/// Editable "tail" of the tag line: everything after the live mode + cwd/path +/// prefix (the builtin command names and anything the user types). Seeded with +/// the default builtins the first time the tag is edited (`tag_init`), then +/// freely editable — no newlines. `tag_col` is the cursor's byte index within +/// the tail; `tag_edit` is true while the tag is focused for editing. Image +/// panes keep a live (non-editable) tag, so these stay unused for them. +tag_tail: std.ArrayList(u8) = .empty, +tag_col: u16 = 0, +tag_init: bool = false, +tag_edit: bool = false, +/// helix `v` char-select within the tag: inclusive [anchor, tag_col]. The tag +/// shares the pane's `mode` (normal/insert), so no separate mode is kept. +tag_sel: bool = false, +tag_anchor: u16 = 0, + /// A real shell pane (has a pty/emulator), as opposed to a file or image view. pub fn isTerminal(self: *const Term) bool { return self.file == null and self.image == null; @@ -173,6 +188,7 @@ pub fn deinit(self: *Term, io: std.Io, gpa: std.mem.Allocator) void { } self.ed_undo.deinit(gpa); self.ed_redo.deinit(gpa); + self.tag_tail.deinit(gpa); self.stream.deinit(); self.term.deinit(gpa); } -- cgit v1.3