# editor: Preserve scroll position when jumping from multibuffer \(\#9921\) · gitcafe/zed

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

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

Visibility: public

Requested revision: fcaf4383e9b0a95ccbb7d9de035155ef6c69a38c

Requested commit: fcaf4383e9b0a95ccbb7d9de035155ef6c69a38c

Commit: fcaf4383e9b0a95ccbb7d9de035155ef6c69a38c

Tree: 4ca7dab32a42cdce492e071353b0db39e8363015

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
editor: Preserve scroll position when jumping from multibuffer (#9921)

This is a best-effort attempt, as the target offset from the top is just
an estimate; furthermore, this does not account for things like project
search header (which adds a bit of vertical offset by itself and is
removed once we jump into a buffer), but it still should improve the
situation quite a bit.

Fixes: #5296

Release Notes:

- Improved target selection when jumping from multibuffer; final
position in the buffer should more closely match the original position
of the cursor in the multibuffer.
```

## Parents

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

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