From a373fdda0102a99cde988f87f822fc451e0f4391 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 6 Jul 2026 21:18:35 -0300 Subject: insert vs normal cursor shape (all pane types) + the tag is always insert mode. Surface.cursor grew a bar flag: the core sets it from the active pane mode (insert -> bar; normal/tty -> block) for both the modal/file cursor and the vt-tracking terminal cursor, and unconditionally for the tag cursor. tty shell: DECSCUSR via vaxis setCursorShape (beam for insert, the terminal default otherwise). gui shell: the insert cursor draws the left-eighth-block glyph in cell colors instead of the reverse-video block (ponytail: it hides the char under it; a dedicated quad if that ever matters). Tag editing: enterTagEdit goes straight to insert, Esc (or anything that exits the tag) restores the body normal mode; Enter looks / Tab executes the word at the cursor from inside the tag (tagChordText kept); the whole normal-mode tag machinery — handleTagKey motions, v/x selection, d/c/y/p, tagEnterInsert/tagDelete/tagYank/tagPaste — deleted as unreachable (~120 lines; multi-word tag execution stays the mouse middle-drag). tag.snap rewritten: INS on click, type/backspace straight in, Esc exit with the text persisting, Enter-look opens the file. Tutor documents it. Cursor SHAPE is not capturable by the harness (position only) — verify by eye: bar in insert/tags, block elsewhere, both shells. 30/30. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/tty.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/tty.zig') diff --git a/src/tty.zig b/src/tty.zig index f503303a..ed97fd2a 100644 --- a/src/tty.zig +++ b/src/tty.zig @@ -260,7 +260,11 @@ pub fn run(init: std.process.Init, opts: pardes.Options) !void { h.draw(child, .{ .scale = .contain }) catch {}; } } - if (surface.cursor) |cur| win.showCursor(cur.x, cur.y); + if (surface.cursor) |cur| { + win.showCursor(cur.x, cur.y); + // insert = beam, everything else = the terminal's default shape + win.setCursorShape(if (cur.bar) .beam else .default); + } const tz_render = tracy.zone(@src(), "vx.render"); try vx.render(tty.writer()); tz_render.end(); -- cgit v1.3