# settings ui: Fix bug with navbar index to page index translation \(\#39245\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 94a4c0c352337567ffa74620789e76c55325e48b

Requested commit: 94a4c0c352337567ffa74620789e76c55325e48b

Commit: 94a4c0c352337567ffa74620789e76c55325e48b

Tree: d96ad521896796675c5b500269936e9c7def1238

Author: Anthony Eid

Committer: GitHub

## Message

```
settings ui: Fix bug with navbar index to page index translation (#39245)

This happened when search results completely filtered out a page above
the selected page index.

The old index was calculated based on the nav bar entry's position and
the count of root entries above it, this was wrong because root entries
could be filtered out with a search. Now the page index is saved when
building the navbar

Release Notes:

- N/A
```

## Parents

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

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