# git_ui: Fix select first entry selects the wrong visual first entry when tree view is enabled \(\#45108\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5b8e4e58c5f548ff1eda6ccd57997e2fda89e4b6

Requested commit: 5b8e4e58c5f548ff1eda6ccd57997e2fda89e4b6

Commit: 5b8e4e58c5f548ff1eda6ccd57997e2fda89e4b6

Tree: 38fde389ef42795d6ce0459347a87062febfbd91

Author: Remco Smits

Committer: GitHub

## Message

```
git_ui: Fix select first entry selects the wrong visual first entry when tree view is enabled (#45108)

This PR fixes a bug where the select first didn't select the first
visual entry when the first entry is a collapsed directory.

Follow-up: https://github.com/zed-industries/zed/pull/45030

**Before**:


https://github.com/user-attachments/assets/5e5865cc-ec0f-471d-a81b-9521fb70df41

**After**:


https://github.com/user-attachments/assets/05562572-e43f-4d1e-9638-80e4dccc0998

Release Notes:

- git_ui: Fix select first entry selects the wrong visual first entry
when tree view is enabled
```

## Parents

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

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