# editor: Fix excerpt down scroll behavior to only scroll when there are enough lines \(\#28231\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 99a9647b78e847d9aabd54c8f182379bd2a57b1a

Requested commit: 99a9647b78e847d9aabd54c8f182379bd2a57b1a

Commit: 99a9647b78e847d9aabd54c8f182379bd2a57b1a

Tree: 0faaf6d625206556295a507b98075759de0c913b

Author: Smit Barmase

Committer: GitHub

## Message

```
editor: Fix excerpt down scroll behavior to only scroll when there are enough lines (#28231)

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

Improves excerpt down button to only scroll when there exists lines more
than equal to `expand_excerpt_lines`. This prevents weird shift at end
of the file.

Before:


https://github.com/user-attachments/assets/244a3bd6-d813-4cc8-9dcb-3addba2b652f

After:


https://github.com/user-attachments/assets/a9a9ba62-a454-4b56-9c8a-d8e6931b270b


Release Notes:

- N/A
```

## Parents

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

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