Skip to content

Take the cursor with the focus - #10

Merged
softov merged 1 commit into
mainfrom
fix/cursor-leaves-the-field
Sep 1, 2026
Merged

Take the cursor with the focus#10
softov merged 1 commit into
mainfrom
fix/cursor-leaves-the-field

Conversation

@softov

@softov softov commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Two halves of the same symptom: tabbing from a text field to a select left the terminal cursor sitting in the field, so the focus looked as though it had never moved.

The writer never knew it had a cursor on screen. A frame with no runs and no cursor returned an empty string, so when the only change was "the caret goes away", nothing was emitted and the terminal went on showing it where it was. WriterState now tracks visibility and hides it when a frame has none.

A select had nowhere to take it. There is nothing to type in one, so it published no cursor at all. It owns the terminal cursor while focused — not as a caret, but because the cursor is the strongest "you are here" a terminal has, and the alternative is a border colour and nothing else.

Tests: 2105 passing, lint clean. Both new tests fail without their half of the fix.

Follow-up worth knowing: Select takes no focusId, so nothing can send the reader to one by name.

A frame that only needed the cursor taken away emitted nothing, and a select
had none to take it to.
@softov
softov merged commit fc5f15b into main Sep 1, 2026
1 check passed
@softov
softov deleted the fix/cursor-leaves-the-field branch September 1, 2026 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant