Add an action listener to workspace for ActivatePreviousItem and ActivateNextItem#42588
Merged
ConradIrwin merged 1 commit intozed-industries:mainfrom Dec 2, 2025
Conversation
pane::ActivateNextItem
Member
|
Thanks! |
someone13574
pushed a commit
to someone13574/zed
that referenced
this pull request
Dec 16, 2025
…vateNextItem (zed-industries#42588) Release Notes: - pane::ActivatePreviousItem and pane::ActivateNextItem now toggle the most recent pane when called from a dock panel a couple months ago i posted a work around that used `SendKeystrokes` to cycle through pane items when focused on a dock. zed-industries#35253 this pr would add this functionality to the these actions by default. i implemented this by adding an action listener to the workspace level. ------ if the current context is a dock that does not hold a pane it retrieves the most recent pane from `activation_history` and activates the next item on that pane instead. - `"Pane > Editor"` cycles through the current pane like normal - `"Dock > Pane > Terminal"` also cycles through the pane items like normal - `"Dock > (Any Child that is not a child of Pane)"` cycles through the items of the most recent pane. this is the standard behavior in VS Code i believe. in the video below you can see the actions cycling through the editor like normal when focus is on the editor. then you can see the editor continue to cycle when the focus is on the project panel. and that the focus stays on the project panel. and you can see the action cycle the terminal items when the focus is moved to the terminal https://github.com/user-attachments/assets/999ab740-d2fa-4d00-9e53-f7605217e6ac the only thing i noticed is that for this to work the keybindings must be set above `Pane` so they have to be set globally or on workspace. otherwise they do not match in the context
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.
Release Notes:
a couple months ago i posted a work around that used
SendKeystrokestocycle through pane items when focused on a dock.
#35253
this pr would add this functionality to the these actions by default.
i implemented this by adding an action listener to the workspace level.
if the current context is a dock that does not hold a pane
it retrieves the most recent pane from
activation_historyand activates the next item on that pane instead."Pane > Editor"cycles through the current pane like normal
"Dock > Pane > Terminal"also cycles through the pane items like normal
"Dock > (Any Child that is not a child of Pane)"cycles through the items of the most recent pane.
this is the standard behavior in VS Code i believe.
in the video below you can see the actions cycling through the editor like normal when focus is on the editor.
then you can see the editor continue to cycle when the focus is on the project panel.
and that the focus stays on the project panel.
and you can see the action cycle the terminal items when the focus is moved to the terminal
activateNextItem.mov
the only thing i noticed is that for this to work the keybindings must be set above
Paneso they have to be set globally or on workspace. otherwise they do not match in the context