feat(tmux): rework prefix-wait and command-prompt statusline#25
Merged
Conversation
The client_prefix state reused the COMMAND label and yellow hue, which collided with the actual command-prompt. Relabel it PREFIX and recolor it orange (#ff966c, unused by other modes) so the leader-wait state reads as distinct from real command input.
Every prompt (move-window, rename, find-window, choose-tree filter, copy-mode search) and message was drawn from column 0, covering the mode block. Prepend the COMMAND + session block via message-format so a prompt continues after the session block with its native prompt text following, mirroring the prefix look. This is the only lever that reaches the built-in filter/search prompts, which cannot take a -p label. The ; binding no longer bakes the block into its own -p, since message-format now provides it globally and would otherwise double it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Two overlapping issues in the statusline's "command" presentation:
client_prefix) reused the yellowCOMMANDtag, which collides with the actual command-prompt. They are different
things: prefix-wait is a leader key waiting for the next press, not
command input.
choose-tree filter, copy-mode search) and message was drawn from
column 0, covering the mode block, instead of continuing the
statusline like the prefix state does.
What
PREFIXin orange#ff966c(unused by anyother mode), freeing
COMMAND/ yellow for the real command-prompt.COMMAND+ session block viamessage-formatso everyprompt continues after the session block, with its native prompt text
(
(move-window),(filter), ...) following it. This is the only leverthat reaches the built-in filter/search prompts, which cannot take a
-plabel.;binding to plaincommand-prompt; the block nowcomes from
message-formatglobally and would otherwise be doubled.Trade-offs
message-formathas no per-prompt-type format variable, so all promptsshare the fixed
COMMANDlabel; the native prompt text distinguishesthem.
display-message) also carry theCOMMAND+ session prefix.