Skip to content

Clear the tmux prompt area so typed commands don't collide with the bar - #5

Merged
jpmontez merged 1 commit into
mainfrom
fix-tmux-prompt-overlay
Sep 8, 2026
Merged

jpmontez merged 1 commit into
mainfrom
fix-tmux-prompt-overlay

Conversation

@jpmontez

@jpmontez jpmontez commented Sep 8, 2026

Copy link
Copy Markdown
Owner

Problem

Typing a command at the tmux prompt (prefix + :, , for rename-window, etc.) left the status bar showing through underneath. : rendered as :main, and typing ren gave :renn — the leftover characters coming from dotbar's session name in status-left.

Cause

Not a dotbar bug. tmux 3.7 draws the prompt on top of a copy of the existing status line (status.c: status_prompt_redraw), and the only thing that blanks the prompt area is the fill attribute of message-style. From the man page:

The fill attribute is used by the default message-format to clear the background.

The stock default is bg=yellow,fg=black,fill=yellow. Our override to base16 ANSI colours dropped fill, so nothing cleared the line.

Fix

Add fill=colour0, matching the bar background already used for bg.

Verification

Reproduced and confirmed in a nested tmux running this exact config:

before after
prefix + : :main :
then typing ren :renn :ren
prefix + , (rename-window) zshn (rename-window) zsh

Bar restores correctly on both cancel and submit. ./doctor.sh shows no new drift.

Skipped message-command-style (the vi-mode prompt) — status-keys is emacs, so it never renders.

🤖 Generated with Claude Code

https://claude.ai/code/session_01AEPYeZgMsmFPVBbRvkFtM2

tmux 3.7 draws the command prompt on top of a copy of the existing status
line (status.c: status_prompt_redraw) and blanks the area only via the
`fill` attribute of message-style. The stock default carries it
(bg=yellow,fg=black,fill=yellow); our override dropped it, so dotbar's
session name bled through whatever was being typed — prefix + `:` rendered
as ":main", and rename-window read as "(rename-window) zshn".

Add fill=colour0 to match the bar background.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01AEPYeZgMsmFPVBbRvkFtM2
@jpmontez
jpmontez merged commit e4c5145 into main Sep 8, 2026
2 checks passed
@jpmontez
jpmontez deleted the fix-tmux-prompt-overlay branch September 8, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant