Skip to content

tmux parity: killing a pane causes focus to jump to left pane #71

@spooki44

Description

@spooki44

Summary

  • In a deterministic 3-pane layout (left, top-right, bottom-right), killing panes causes focus to jump to the left pane.
  • This occurs both when killing the active pane (bottom-right) and when killing a non-active pane (top-right).
  • For tmux parity:
    • killing a non-active pane should not change focus
    • killing the active pane should focus a sensible remaining pane (typically the most recently active remaining pane)

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

  • If a non-active pane is destroyed, focus remains on the current active pane.
  • If the active pane is destroyed, focus moves to the most recently active remaining pane (tmux behavior / pane MRU order).

Edit: clarified the second expectation to state the tmux behavior more precisely. This is a clarification, not a scope change.

Actual

  • Focus jumps to the left pane after pane destruction, regardless of which pane is killed.

Reproduction

  1. Start a fresh attached psmux 0.4.7 session (default config).
  2. Vertical split: Ctrl+b % (focus moves to the right pane).
  3. In the right pane, horizontal split: Ctrl+b " (focus moves to bottom-right).
    • Total panes: left, top-right, bottom-right.

Case A: kill the active pane (bottom-right)

  1. Kill the active pane: Ctrl+b x then confirm y (if prompted).

Result:

  • Observed: focus moves to left pane.
  • Expected: focus moves to a sensible remaining pane (tmux parity: top-right is the most recent remaining right-side pane in this sequence).

Case B: kill a non-active pane (top-right) while bottom-right is active

  1. Ensure bottom-right is active (it is immediately after step 3).
  2. Open command prompt: Ctrl+b :
  3. Run: kill-pane -t :.1 (targeting top-right pane by index in this deterministic layout)

Result:

  • Observed: focus jumps to left pane.
  • Expected: focus remains on bottom-right (active pane unchanged).

Result

Pane destruction appears to incorrectly shift focus to the left pane in this 3-pane layout, diverging from tmux parity for both active-pane and non-active-pane kills.

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