# Scroll to follow expanding part of \`editor::SelectLargerSyntaxNode\` \(\#27295\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 9918b6cadea55feae131c9e4727bf7c55c7e75a0

Requested commit: 9918b6cadea55feae131c9e4727bf7c55c7e75a0

Commit: 9918b6cadea55feae131c9e4727bf7c55c7e75a0

Tree: ede8edc3f06254d325897d079acfc39d476df902

Author: João Marcos

Committer: GitHub

## Message

```
Scroll to follow expanding part of `editor::SelectLargerSyntaxNode` (#27295)

When the selection grows both ways, the new code prioritizes the top
part instead of bottom one, this is usually more helpful considering
that most programming language grammars tend to define tokens right
before large delimited blocks, and rarely after (because humans and
parsers read from top to bottom).

Also, revert selection when convenient, so you have more control over
what you're selecting, looking at the selection `head` is commonly more
convenient than at the `tail`.

Release Notes:

- Improve scrolling of `editor::SelectLargerSyntaxNode` for better
visibility.
```

## Parents

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

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