# Fix Project Panel \`select_next_git_entry\` action \(\#24217\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d83c316e6d37130ac353e552a7430e432eaa033c

Requested commit: d83c316e6d37130ac353e552a7430e432eaa033c

Commit: d83c316e6d37130ac353e552a7430e432eaa033c

Tree: 538d71db54d799d9072dc248c1716741db42effc

Author: Anthony Eid

Committer: GitHub

## Message

```
Fix Project Panel `select_next_git_entry` action (#24217)

## Context

I noticed that the project panel `select_next_git_entry` wasn't behaving
correctly. Turns out it was searching in reverse, which caused the
action to select itself or the last entry.

This PR corrects the behavior and adds a unit test that should stop
regressions.

Note: Since select next/prev git entry uses the same function as select
next/prev diagnostic, the test partially works for that as well.

Release Notes:

- Fix bug where `select_next_git_entry` project panel action would only
select a previous entry or the currently selected entry.

---------

Co-authored-by: Mikayla Maki <mikayla@zed.dev>
```

## Parents

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

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