Repository navigation
fix(tui): pause cursor blinking when unfocused - #91
Merged
Merged
Conversation
Issacboy123
approved these changes
Aug 17, 2026
Issacboy123
left a comment
Contributor
There was a problem hiding this comment.
This PR looks good to me, handles focus well in various terminals for the cursor to either be blinking or not.
Pepps233
force-pushed
the
fix/tui-cursor-focus
branch
from
August 17, 2026 17:42
9008a45 to
2223ca5
Compare
Pepps233
force-pushed
the
fix/tui-cursor-focus
branch
from
August 17, 2026 17:49
1481e9b to
c380afa
Compare
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.
Summary
Pause editor cursor blinking when the terminal window or pane is not focused.
Reasoning
Input activity cannot reliably indicate focus because an active user may be reading or waiting. The TUI now uses standard terminal focus reports and treats unavailable tmux focus reporting conservatively.
Changes
focus-eventssettingUser impact
The placeholder cursor blinks in focused terminals and panes, stays visible without animation when unfocused, and remains static when reliable focus reporting is unavailable. tmux users can enable focused-pane animation with
set -g focus-events on.Testing
npm run check./test.shcd packages/tui && node --test test/terminal.test.ts test/editor-placeholder-cursor.test.ts test/tui-focus.test.ts test/tui-alt-screen.test.ts