[PR #8183] Support for navigating panes by MRU #27130

Open
opened 2026-01-31 09:20:11 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/8183

State: closed
Merged: Yes


Adds a "move to previous pane" and "move to next pane" keybinding, which
navigates to the last/first focused pane

We assign pane IDs on creation and maintain a vector of active pane IDs
in MRU order. Navigating panes by MRU then requires specifying which
pane ID we want to focus.

From our offline discussion (thanks @zadjii-msft for the concise
description):

For the record, the full spec I'm imagining is:

{ command": { "action": "focus(Next|Prev)Pane", "order": "inOrder"|"mru", "useSwitcher": true|false } },

and order defaults to mru, and useSwitcher will default to true, when
there is a switcher. So

{ command": { "action": "focusNextPane" } },
{ command": { "action": "focusNextPane", "order": "mru" } },

these are the same action. (but right now we don't support the order
param)

Then there'll be another PR for "focusPane(target=id)"

Then a third PR for "focus(Next|Prev)Pane(order=inOrder)"

for the record, I prefer this approach over the "one action to rule
them all" version with both target and order/direction as params,
because I don't like the confusion of what happens if there's both
target and order/direction provided.

References #1000
Closes #2871

**Original Pull Request:** https://github.com/microsoft/terminal/pull/8183 **State:** closed **Merged:** Yes --- Adds a "move to previous pane" and "move to next pane" keybinding, which navigates to the last/first focused pane We assign pane IDs on creation and maintain a vector of active pane IDs in MRU order. Navigating panes by MRU then requires specifying which pane ID we want to focus. From our offline discussion (thanks @zadjii-msft for the concise description): > For the record, the full spec I'm imagining is: > > { command": { "action": "focus(Next|Prev)Pane", "order": "inOrder"|"mru", "useSwitcher": true|false } }, > > and order defaults to mru, and useSwitcher will default to true, when > there is a switcher. So > > { command": { "action": "focusNextPane" } }, > { command": { "action": "focusNextPane", "order": "mru" } }, > > these are the same action. (but right now we don't support the order > param) > > Then there'll be another PR for "focusPane(target=id)" > > Then a third PR for "focus(Next|Prev)Pane(order=inOrder)" > for the record, I prefer this approach over the "one action to rule > them all" version with both target and order/direction as params, > because I don't like the confusion of what happens if there's both > target and order/direction provided. References #1000 Closes #2871
claunia added the pull-request label 2026-01-31 09:20:11 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27130