From 4d5302edfefea0206ca96726f2fcc254ee228ad3 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 29 Jun 2026 21:37:26 -0300 Subject: vibes adding some acme swag to the tty --- term.zig | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'term.zig') diff --git a/term.zig b/term.zig index d5030e5b..307b116f 100644 --- a/term.zig +++ b/term.zig @@ -49,14 +49,17 @@ vweight: f32 = 1, /// One independent selection per mouse button: 0=left, 1=middle, 2=right. sel: [3]Sel = .{ .{}, .{}, .{} }, -/// modal input. false = "sym" mode (keys -> pty as terminal sequences), -/// true = "char" mode (keys insert text at the cursor). a left-click enters -/// char mode and anchors the cursor; Esc leaves it. +/// modal input. true = "text"/char mode (DEFAULT; keys insert text at the +/// cursor, shell prompts hidden), false = "tty"/sym mode (keys -> pty as +/// terminal sequences, prompts shown). Esc toggles to tty; a left-click returns +/// to text mode and anchors the cursor. /// /// The cursor and edits are anchored at ABSOLUTE body rows (visual row + scroll /// offset) so they ride the scrollback, not the screen. `cur_off` is the offset -/// into the run sitting at (cur_row, cur_col). -editing: bool = false, +/// into the run sitting at (cur_row, cur_col). `cur_pinned` is false until the +/// user clicks or types, while which the cursor tracks the shell's cursor. +editing: bool = true, +cur_pinned: bool = false, cur_row: i32 = 0, cur_col: i32 = 0, cur_off: u16 = 0, -- cgit v1.3