summaryrefslogtreecommitdiff
path: root/term.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-06-29 21:37:26 -0300
committerGabriel Schneider <[email protected]>2026-06-29 22:32:59 -0300
commit4d5302edfefea0206ca96726f2fcc254ee228ad3 (patch)
tree41df515b46e5652767a96ed206afee35021461b9 /term.zig
parentb52e1e7274770fdfdf859938cb01095a8cc1a320 (diff)
downloadpardes-4d5302edfefea0206ca96726f2fcc254ee228ad3.tar.gz
pardes-4d5302edfefea0206ca96726f2fcc254ee228ad3.zip
vibes adding some acme swag to the tty
Diffstat (limited to 'term.zig')
-rw-r--r--term.zig13
1 files changed, 8 insertions, 5 deletions
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,