outline_panel: Remove toggle expanded behavior from OpenSelectedEntry#42214
Merged
smitbarmase merged 2 commits intozed-industries:mainfrom Nov 13, 2025
Conversation
Contributor
Author
|
I notice that the tests that are failing are checking to see if the panel has those items open? Did I misread the intended behavior? @smitbarmase |
smitbarmase
approved these changes
Nov 13, 2025
Member
smitbarmase
left a comment
There was a problem hiding this comment.
Turns out we were incorrectly using OpenSelectedEntry in tests for expand/collapse actions. Now the behaviors are more decoupled: OpenSelectedEntry just focuses the current outline entry in the editor, and we already have expand/collapse actions with the default left/right arrow key bindings for that. Thanks for working on this!
11happy
pushed a commit
to 11happy/zed
that referenced
this pull request
Dec 1, 2025
…zed-industries#42214) Fixed outline panel space key behavior by removing duplicate toggle call The `open_selected_entry` function in `outline_panel.rs` was incorrectly calling `self.toggle_expanded(&selected_entry, window, cx)` in addition to its primary logic, causing the space key to both open/close entries AND toggle their expanded state. Removed the redundant `toggle_expanded` call to achieve the intended behavior. Closes zed-industries#41711 Release Notes: - Fixed issue with the outline panel where pressing space would cause an open selected entry to collapse and cause a closed selected entry to open. --------- Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
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.
Fixed outline panel space key behavior by removing duplicate toggle call
The
open_selected_entryfunction inoutline_panel.rswas incorrectly callingself.toggle_expanded(&selected_entry, window, cx)in addition to its primary logic, causing the space key to both open/close entries AND toggle their expanded state. Removed the redundanttoggle_expandedcall to achieve the intended behavior.Closes #41711
Release Notes: