# project_panel: Fix autoscroll to treat entries behind sticky items as out of viewport \(\#35067\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6e4f7470413ab709f766793cd23c0aa65700cf99

Requested commit: 6e4f7470413ab709f766793cd23c0aa65700cf99

Commit: 6e4f7470413ab709f766793cd23c0aa65700cf99

Tree: 47f2750241b5d342fea799a75769873d5aea5396

Author: Smit Barmase

Committer: GitHub

## Message

```
project_panel: Fix autoscroll to treat entries behind sticky items as out of viewport (#35067)

Closes #34831

Autoscroll centers items only if they’re out of viewport. Before this
PR, entry behind sticky items was not considered out of viewport, and
hence actions like `reveal in project panel` or focusing buffer would
not autoscroll that entry into the view in that case.

This PR fixes that by using recently added `scroll_to_item_with_offset`
in https://github.com/zed-industries/zed/pull/35064.

Release Notes:

- Fixed issue where `pane: reveal in project panel` action was not
working if the entry was behind sticky items.
```

## Parents

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

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