Repository navigation
Inconsistent terminfo entry for resetting cursor style #12482
Description
Discussed in #12481
Originally posted by kylesower April 26, 2026
Issue Description
Ghostty's terminfo entry defines Se (reset cursor style) as \E[2 q (steady block) here. This sets the cursor to a steady block, leading to odd behavior when applications want to reset the cursor style. Out of the box, Ghostty uses a blinking bar cursor (with shell integration enabled for cursor) or a blinking block (without shell integration), so the Se entry isn't even consistent with Ghostty's built-in defaults.
I think the entry should be changed to \E[0 q since Ghostty already allows using this to set to the user configured default. Alacritty does this, and iTerm2 recently changed it to the same in gnachman/iTerm2#651. This will help reduce some issues in neovim (neovim/neovim#38987) where we use the Se sequence to reset cursor style.
For reference, xterm specifies that
Se resets the cursor style to the terminal power-on default.
Expected Behavior
Se terminfo entry sequence will reset the cursor style to the user configured default; in other words, Se=\E[0 q.
Actual Behavior
Se=\E[2 q, which resets the cursor to a steady block, regardless of the user defined config.
Reproduction Steps
- Configure Ghostty as follows:
cursor-style = underline
cursor-style-blink = false
shell-integration-features = no-cursor
- Open Ghostty
- Cursor should be solid underline (assuming your shell isn't changing it)
- Run the terminfo
Seentry for resetting cursor style:
printf "\e[2 q"- Cursor is now solid block
Ghostty Logs
No response
Ghostty Version
Ghostty 1.3.1-arch2
Version
- version: 1.3.1-arch2
- channel: tip
Build Config
- Zig version : 0.15.2
- build mode : .ReleaseFast
- app runtime : .gtk
- font engine : .fontconfig_freetype
- renderer : renderer.generic.Renderer(renderer.OpenGL)
- libxev : io_uring
- kernel version: 6.19.12-artix1-1
- desktop env : other
- GTK version :
build : 4.22.2
runtime : 4.22.2
- libadwaita : enabled
build : 1.9.0
runtime : 1.9.0
- libX11 : enabled
- libwayland : enabled
OS Version Information
6.19.12-artix1-1
(Linux only) Display Server
Wayland
(Linux only) Desktop Environment/Window Manager
Hyprland 0.54.3
Minimal Ghostty Configuration
cursor-style = underline
cursor-style-blink = false
shell-integration-features = no-cursorAdditional Relevant Configuration
No response
I acknowledge that:
- I have reviewed the FAQ and confirm that my issue is NOT among them.
- I have searched the Ghostty repository (both open and closed Discussions and Issues) and confirm this is not a duplicate of an existing issue or discussion.
- I have checked the "Preview" tab on all text fields to ensure that everything looks right, and have wrapped all configuration and code in code blocks with a group of three backticks (
```) on separate lines.
Activity
fix: update Se terminfo entry to reset cursor to configured default (#…
fix: update Se terminfo entry to reset cursor to configured default (…