Skip to content

Nerd Font icons render at single-cell size in Ghostty/kitty because spaces are replaced with NBSP #796

Closed

Description

@chatoo2412

Problem

ccstatusline.ts replaces every space in the output with U+00A0 before printing (source), to keep VS Code from trimming it.

Ghostty and kitty let a Nerd Font icon use two cells only when the next cell is U+0020 or U+2002. U+00A0 is left out on purpose, as the way to force an icon to stay single-cell (ghostty-org/ghostty#2434, kovidgoyal/kitty#6750). Because every icon in ccstatusline's output is followed by U+00A0, all icons are squeezed into a single cell and look much smaller than the same icons in the shell prompt.

Reproduction

  • ccstatusline 2.2.33, Ghostty 1.3.1 (same logic in 1.4.0), macOS
  • Add a Custom Text widget containing 󱙺 Opus (U+F167A + space)
  • The icon renders at single-cell size

Piping the output through perl -CS -pe 's/([\x{E000}-\x{F8FF}\x{F0000}-\x{FFFFD}])\x{A0}/$1 /g' makes the icons render at full size.

Suggestion

Emit U+2002 (EN SPACE) instead of U+00A0 after Private Use Area characters. Terminals that support wide icons treat it as "may use two cells", and, like U+00A0, it is not collapsed by HTML whitespace handling.

Activity

  1. added a commit that references this issue on Nov 5, 2026
    aa3f2e0
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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions