Skip to content

Theme colors break on tmux next-3.7: leading hex digit eaten by format expansion #596

@hoblin

Description

@hoblin

I am not requesting help with my configuration and believe something is genuinely broken.

  • Something is really actually broken.

Is there an existing issue outlining your problem?

  • I have searched the existing issues and troubleshooting guide, and they do not solve my problem.

Describe your problem.

On tmux next-3.7, every theme color whose first hex digit is 19 is corrupted at render time — the leading digit is dropped (#15232d5232d), producing an invalid color. Status modules, the window list, and pane borders render with broken/transparent colors. Colors starting with 0 or af are unaffected.

Root cause (upstream tmux): tmux/tmux#5121 (the run-shell argument feature, merged 2026-06-01) added #1#9 as positional-argument shorthand directly in format_expand1. Any format expansion now treats a literal # followed by 19 as an (empty) positional argument and consumes it.

Why it hits catppuccin: the plugin resolves theme colors through #{E:…}, and the status line is rendered through #{E:@catppuccin_status_*}. So literal hex such as mocha's @thm_bg #1e1e2e / @thm_crust #11111b loses its leading digit. Every flavor has such colors, so all flavors are affected — not a single custom theme.

Expected: colors render intact (#1e1e2e), as on tmux ≤ 3.5a.

Paste your configuration.

Minimal reproduction — tmux only, no plugin needed (proves it is the tmux change):

tmux -f /dev/null new-session -d
for d in 0 1 2 3 4 5 6 7 8 9 a b c d e f; do
  tmux set -g @c "#${d}3549f"
  printf '#%s3549f -> %s\n' "$d" "$(tmux display -p '#{E:@c}')"
done
tmux kill-server

On next-3.7 this prints #13549f -> 3549f#93549f -> 3549f (digits 1–9 eaten); on 3.5a all sixteen round-trip intact.

Plugin reproduction (default mocha):

set -g @catppuccin_flavor "mocha"
set -g status-right "#{E:@catppuccin_status_host}"
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux

The host module's crust foreground renders as 1111b instead of #11111b.

Attach screenshots.

Window/status separators render transparent or garbled wherever a #1-leading surface color is used.

tmux next-3.7 expected state
Image Image

What tmux version are you seeing the issue on?

tmux next-3.7

What shell are you using?

bash / zsh (shell-independent)

Any additional comments?

Brand-new: tmux/tmux#5121 merged 2026-06-01, so released tmux (≤ 3.6) is unaffected — only next-3.7 / master builds are. A fix is prepared (resolve theme colors with #{@thm_*} instead of #{E:@thm_*} at build time, and escape resolved #RRGGBB##RRGGBB in the render-expanded formats so the render unescapes them); PR to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions