Skip to content

fix: add --cursor-blink flag to disable terminal cursor blink#54

Open
fuleinist wants to merge 1 commit into
Necrom4:masterfrom
fuleinist:fix/cursor-blink-flag
Open

fix: add --cursor-blink flag to disable terminal cursor blink#54
fuleinist wants to merge 1 commit into
Necrom4:masterfrom
fuleinist:fix/cursor-blink-flag

Conversation

@fuleinist
Copy link
Copy Markdown

On macOS Kitty the blinking cursor triggers constant redraws (~500ms), making text selection and link hover nearly impossible.

This adds a --cursor-blink flag (default: true) so affected users can disable blinking with:

sbb-tui --cursor-blink=false

Fixes #27

On macOS Kitty the blinking cursor triggers constant redraws (~500ms),
making text selection and link hover nearly impossible.

Add a --cursor-blink flag (default true) so users can disable blinking
with: sbb-tui --cursor-blink=false

Fixes Necrom4#27
@Necrom4
Copy link
Copy Markdown
Owner

Necrom4 commented Apr 17, 2026

Thanks for the PR!
Unfortunately it doesn't work, although the cursor is static when opening the TUI, it starts blinking again as soon as someone presses a key.

I recommend you go with a solution like this one:

# ui/model.go

# in the m.inputs range of NewModel
t.Cursor.Style = m.styles.active
+ t.Cursor.SetMode(cursor.CursorStatic) # don't forget to import `cursor` at the top of the file too

# in Init()
func (m appModel) Init() tea.Cmd {
-	return tea.Batch(textinput.Blink, checkVersionCmd(m.currentVersion))
+	return checkVersionCmd(m.currentVersion)
}

Also concerning your last commit, please for the next modifications format the model.go file correctly (misaligned definitions) and don't use double negatives ("DisableCursorBlink").

Lastly I'd very much rather have the cursor blink option as a default (to "true") in the config file rather than as a flag, as it's an option people will always want ON and it'd be anoying to constantly pass the flag. Don't forget to document your changes in the "config" section of the README.md!

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.

MacOS Kitty Select and Link Hover issues.

2 participants