Cursor blinking stops working after opening/closing certain TUI apps (e.g., neovim, yazi) #9209
-
Issue DescriptionWhen using Ghostty with cursor-style-blink=true, the cursor blinking stops after opening and closing some terminal user interface (TUI) applications such as neovim or yazi. Expected BehaviorThe cursor should continue blinking after closing any TUI application when cursor-style-blink=true is set. Actual BehaviorAfter closing a TUI application such as neovim in any tab, the cursor stops blinking and remains static in this tab until Ghostty is restarted or a new tab is opened. Reproduction Steps
Ghostty LogsGhostty VersionOS Version InformationmacOS Tahoe Version 26.0.1 (25A362) (Linux only) Display ServerNone (Linux only) Desktop Environment/Window ManagerNo response Minimal Ghostty Configurationshell-integration-features = no-cursor
cursor-style = block
cursor-style-blink = trueAdditional Relevant ConfigurationNo response I acknowledge that:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
|
Having a quick glance at this im not 100% sure this is ghosttys fault. In some circumstances the tui is supposed to restore the cursor when it exits. https://ghostty.org/docs/config/reference#cursor-style This is described in the docs. Ghostty only sets the style for the default cursor if it gets overriden but not restored properly then it will not blink anymore. This is an example of helix not restoring the cursor style on exit |
Beta Was this translation helpful? Give feedback.
no that is the opposite
the default shell-integration features explicitly set the cursor back after every command the style of which is not configurable it will always be a blinking bar. When no-cursor is supplied it no longer resets the cursor style for you
https://github.com/ghostty-org/ghostty/blob/main/src/shell-integration/bash/ghostty.bash#L209
you can see the reset is
\e [0 qwhich resets to the default cursor style just like the suggested workaround in the helix thread I linked above note that\033and\eare the same thing