diff options
| author | Gabriel Schneider <[email protected]> | 2026-07-01 17:59:23 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-08-01 15:02:07 -0300 |
| commit | f3618a5a3151e02db2c1e2280ab42d48c35eeba9 (patch) | |
| tree | 959910004851d112488e132d6555e73d417dcabb /term.zig | |
| parent | 48d7ef85c0b7fb1bed0bceba753e82f63a842fd5 (diff) | |
| download | pardes-f3618a5a3151e02db2c1e2280ab42d48c35eeba9.tar.gz pardes-f3618a5a3151e02db2c1e2280ab42d48c35eeba9.zip | |
tagline is editable now
Diffstat (limited to 'term.zig')
| -rw-r--r-- | term.zig | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -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); } |
