Skip to content

tmux parity: C-b q is sticky and 1-based; key passthrough desyncs pane #72

@spooki44

Description

@spooki44

Summary

  • psmux C-b q implements “type a number to select a pane” (e.g., typing 2 focuses pane 2), which could be intentional.
  • However it still diverges from tmux defaults and has a clear input/terminal desync issue while the pane-number overlay is active:
    1. pane numbering: tmux default is 0-based; psmux shows 1-based indices
    2. lifetime/exit: tmux shows briefly (default ~1s) and exits on any non-prefix keypress; psmux remains until Escape or a selection
    3. input handling: while the overlay is visible, normal keypresses are passed through to the underlying pane program, and the underlying program’s visible input becomes desynced/laggy (characters appear delayed / in batches)

Environment

  • OS: Windows 11
  • Terminal: Windows Terminal
  • Shell: PowerShell 7
  • psmux: 0.4.7
  • tmux (parity reference): 3.6a (no user config, default bindings)
  • Config state for verification: reproduced with default config for psmux

Expected (tmux default behavior)

  • C-b q shows pane indices using tmux defaults (0-based unless pane-base-index is changed).
  • Overlay duration is controlled by display-panes-time (default ~1000ms) and it closes on any keypress.
  • While the overlay is visible:
    • pressing a digit selects that pane (tmux uses 09)
    • other keypresses dismiss the overlay
    • keystrokes used during the overlay are handled by tmux and do not get delivered to the underlying pane program
    • underlying pane input/display should not become visually desynced

Actual (psmux 0.4.7)

  • Pane indices shown by C-b q are 1-based.
  • Overlay remains visible until:
    • a pane is selected by typing a number, or
    • Escape is pressed.
  • While the overlay is visible, normal typing is delivered to the underlying pane program.
  • The underlying pane’s visible input becomes desynced/laggy (characters appear delayed / in batches), e.g.:
    • type a -> underlying program shows a
    • type b -> underlying program still shows a
    • type c -> underlying program shows ab
    • type d -> underlying program shows abc
    • (continues: display lags behind typed keys / updates inconsistently)
  • This leaves the terminal state visually inconsistent while the overlay is active until it is dismissed.

Reproduction

  1. Start a fresh attached psmux 0.4.7 session (default config).
  2. Create multiple panes (e.g., Ctrl+b %).
  3. Ensure the active pane is running an interactive program that echoes input (e.g., PowerShell prompt).
  4. Press Ctrl+b q to show pane indices.
  5. While the overlay is visible, type a, b, c, d (or any sequence of characters).

Result:

  • Observed:
    • non-numeric keystrokes pass through to the underlying pane program while the overlay is visible
    • underlying program’s visible input lags/desyncs in the pattern above
    • overlay remains up until Escape or a numeric selection is made
  • Expected (tmux default):
    • overlay closes quickly (default ~1s) and/or closes on any keypress
    • keystrokes used during the overlay do not pass through to the underlying program
    • no underlying input/display desync

Result

C-b q diverges from tmux defaults (index base and overlay lifetime), and passing keystrokes through while the overlay is active causes underlying pane input/display desynchronization.

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