# outline_panel: Remove toggle expanded behavior from OpenSelectedEntry \(\#42214\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c626e770a036320e1c827c90d2182dc1ee541f6e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c626e770a036320e1c827c90d2182dc1ee541f6e

Requested commit: c626e770a036320e1c827c90d2182dc1ee541f6e

Commit: c626e770a036320e1c827c90d2182dc1ee541f6e

Tree: 6d781bd5b5852535a1eba71410be8110e8e2961f

Author: Kevin Rubio

Committer: GitHub

## Message

```
outline_panel: Remove toggle expanded behavior from OpenSelectedEntry (#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 #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>
```

## Parents

- [fa0c7500c1316ef720eed202a807ffe7272282c3](https://git.cafe/gitcafe/zed/commit/fa0c7500c1316ef720eed202a807ffe7272282c3?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c626e770a036320e1c827c90d2182dc1ee541f6e?format=markdown)
