Take the cursor with the focus - #10
Merged
Merged
Conversation
A frame that only needed the cursor taken away emitted nothing, and a select had none to take it to.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
WriterStatenow 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:
Selecttakes nofocusId, so nothing can send the reader to one by name.