Skip to content

fix: pass through navigation keys when tmux can't move - #472

Open
imkgh wants to merge 1 commit into
christoomey:masterfrom
imkgh:master
Open

fix: pass through navigation keys when tmux can't move#472
imkgh wants to merge 1 commit into
christoomey:masterfrom
imkgh:master

Conversation

@imkgh

@imkgh imkgh commented Jan 26, 2026

Copy link
Copy Markdown

Summary

This change makes pane-navigation keybindings smarter by only running select-pane when it can actually succeed. When the window is zoomed or there is no neighboring pane in the requested direction, the key is passed through to the application instead.

Motivation

Prevent no-op select-pane in zoomed windows or at pane edges from swallowing navigation keys; pass them through to the app instead.

Behavior matrix

  • In Vim: always send-keys <key> (unchanged).
  • Not in Vim + neighbor exists: tmux runs select-pane (navigation).
  • Not in Vim + no neighbor: send-keys <key> (pass-through).

Tested

  • Switching works when neighbors exist.
  • Keys pass through when zoomed (resize-pane -Z) or at pane edges / single pane.

@imkgh imkgh changed the title feat: pass through navigation keys when zoomed or at pane boundaries (incl. single-pane) feat: pass through navigation keys at pane boundaries (incl. single-pane) Jan 26, 2026
@imkgh imkgh changed the title feat: pass through navigation keys at pane boundaries (incl. single-pane) fix: pass through navigation keys when tmux can't move Jan 27, 2026
When not in Vim, only run select-pane if an adjacent pane exists (and
optionally when not zoomed). Otherwise send the key through so default
bindings like Ctrl-l (clear screen) still work in single-pane or at pane
edges.
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