Skip to content

[BUG] Tab indents lose the background colour in fullscreen mode #97611

Description

@rokokol

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

In fullscreen mode (CLAUDE_CODE_NO_FLICKER=1), the cells that a tab character expands to do not get the background of the text around them. Claude Code writes ESC[49m (default background) before the tab cells and sets the background again only for the text after them. So the terminal's own background shows through as a hole

This affects every background that Claude Code paints under text. I saw it in a user message (userMessageBackground) and under the text selection (selectionBg). On a dark terminal with a dark theme, the hole is almost the same colour as the background, so it is easy to miss. With a light terminal and a coloured background, each tab indent shows as a white block

What Should Happen?

The cells of a tab indent should have the same background as the rest of the line

Error Messages/Logs

# tmux capture-pane -e of a user message "Reply with just OK.\n\tone tab\n\t\ttwo tabs",
# with a custom theme that sets userMessageBackground to #0D0E0F
ESC[38;2;175;175;175mESC[48;2;13;14;15m❯ ESC[38;2;0;0;0mReply with just OK.ESC[39m
  ESC[49m      ESC[38;2;0;0;0mESC[48;2;13;14;15mone tabESC[39m
  ESC[49m              ESC[38;2;0;0;0mESC[48;2;13;14;15mtwo tabsESC[39m

Steps to Reproduce

  1. Create ~/.claude/themes/probe.json:
    {"name": "probe", "base": "light", "overrides": {"userMessageBackground": "#0D0E0F", "selectionBg": "#0A0B0C"}}
  2. In tmux, start Claude Code with a message that has tab-indented lines:
    tmux new-session -d -x 100 -y 30 "CLAUDE_CODE_NO_FLICKER=1 CLAUDE_CODE_TMUX_TRUECOLOR=1 claude --settings '{\"theme\":\"custom:probe\"}' \"\$(printf 'Reply with just OK.\n\tone tab\n\t\ttwo tabs\n')\""
  3. After the reply, run tmux capture-pane -e -p and look at the lines with tabs
  4. The indent cells have ESC[49m, and the text after them has ESC[48;2;13;14;15m

In a real terminal with a light background, the indent shows as a white block inside the coloured message. Selecting tab-indented tool output shows the same holes in the selection

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.280 (Claude Code). The latest release is 2.1.283, and I did not test it

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

NixOS, kitty 0.49.0 for the visual report, tmux 3.7c for the capture above

Activity

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

    area:tuibugSomething isn't workinghas reproHas detailed reproduction stepsplatform:linuxIssue specifically occurs on Linux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions