Skip to content

Inconsistent terminfo entry for resetting cursor style #12482

Closed

Description

@jcollie

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

  1. Configure Ghostty as follows:
cursor-style = underline
cursor-style-blink = false
shell-integration-features = no-cursor
  1. Open Ghostty
  2. Cursor should be solid underline (assuming your shell isn't changing it)
  3. Run the terminfo Se entry for resetting cursor style:
printf "\e[2 q"
  1. 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-cursor

Additional 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    contributor friendlyA well-scoped, approachable issue for someone looking to contribute.

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions