FABRIC-2.md §I.9 follow-on: blinking | cursor instead of static block
Captain Bob asked for the framebuffer cursor to render as a blinking vertical bar rather than the previous static solid-block glyph. vt100_draw_cursor() (hal/vt100.c) now fills a thin bar (cell_w()/8, min 1px, full cell height) at the cursor's left edge instead of the whole cell -- an I-beam shape. vt100_erase_cursor() is unchanged (clearing the whole cell already safely covers the narrower bar). Blinking is new in repl.c: sk_console_readline()'s idle branch toggles the cursor on/off every SK_CURSOR_BLINK_INTERVAL (50 ticks, 500ms at 100Hz) via alternating console_fb_draw_cursor()/console_fb_erase_cursor() calls, independent of the heartbeat/idle-beat mechanism the §I.9 fix just touched (deliberately not reused, to avoid recoupling to that path). Runs regardless of n, so it blinks whether sitting at a bare prompt or paused mid-edit. Every deterministic draw site (initial prompt, prompt reanchor, backspace, character echo) now goes through a new helper, sk_cursor_show(), which resets the blink cycle to "on" and redraws -- typing always shows a solid cursor, never mid-blink. Verified via the mandatory foreground 3-arch QEMU acceptance boot: amd64 (logs/20260905-021054, extensive live interactive typing including multi-line : / ; word definitions and error cases, prompts stayed correctly attached throughout), aarch64 (logs/20260905-021551), riscv64 (logs/20260905-022324) -- all three reached (zuse) ok> and shut down cleanly via BYE. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019YcT3H2PQeyujrzjqS3Var
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
8edb95b65d
commit
70dc8beba4
+28
@@ -4749,3 +4749,31 @@ The secondary, unverified cursor-glyph-staleness observation above was not indep
|
||||
re-checked — out of scope for this fix, and about to be superseded anyway by a separate
|
||||
requested change (blinking `|` cursor instead of a static block), tracked as a new item, not
|
||||
here.
|
||||
|
||||
**Follow-on, 2026-09-05, same day: cursor style changed to a blinking `|`.** Captain Bob asked
|
||||
for a blinking vertical bar instead of the previous static solid-block cursor. Two changes:
|
||||
|
||||
1. `vt100_draw_cursor()` (`hal/vt100.c`) now fills a thin vertical bar (`cell_w()/8`, minimum 1
|
||||
px, full cell height) at the cursor's left edge instead of the whole cell — an I-beam shape
|
||||
rather than a block. `vt100_erase_cursor()` is unchanged (still clears the whole cell, which
|
||||
safely covers the narrower bar too).
|
||||
2. Blinking (`repl.c`): `sk_console_readline()`'s idle branch now toggles the cursor on/off
|
||||
every `SK_CURSOR_BLINK_INTERVAL` (50 ticks, 500 ms at 100 Hz) via alternating
|
||||
`console_fb_draw_cursor()`/`console_fb_erase_cursor()` calls, tracked by
|
||||
`g_cursor_visible`/`g_cursor_blink_tick`. This runs regardless of `n` (blinks whether sitting
|
||||
at a bare prompt or paused mid-edit, like a real terminal). Every deterministic draw site
|
||||
(initial prompt, prompt reanchor, backspace, character echo) now calls a new helper,
|
||||
`sk_cursor_show()`, instead of `console_fb_draw_cursor()` directly — it resets the blink
|
||||
cycle to "on" and redraws, so typing always shows a solid cursor rather than possibly
|
||||
landing mid-blink.
|
||||
|
||||
Verified via the mandatory 3-arch foreground `clean qemu` boot: amd64 (`logs/20260905-021054/`,
|
||||
extensive live interactive typing including multi-line `:`/`;` word definitions and error
|
||||
cases, all prompts stayed correctly attached with no phantom breaks), aarch64
|
||||
(`logs/20260905-021551/`), riscv64 (`logs/20260905-022324/`) — all three reached `(zuse) ok>`
|
||||
and shut down cleanly via `BYE`. Blink timing itself isn't independently visible in a serial
|
||||
log (it's a framebuffer-only effect, gated the same way the previous static cursor was — no-op
|
||||
outside TTF/graphics mode); the boots above confirm the change doesn't regress the console
|
||||
otherwise. No separate screenshot capture was done for this follow-on since the earlier §I.9
|
||||
fix already covers the correctness property that actually mattered (no phantom linebreak) and
|
||||
this change only touches cursor *rendering*, not console line/newline logic.
|
||||
|
||||
Reference in New Issue
Block a user