# Rework go to line infrastructure \(\#23654\) · gitcafe/zed

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

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

Visibility: public

Requested revision: da2bd4b8e9209088a28f76e993e79af89aebb7f3

Requested commit: da2bd4b8e9209088a28f76e993e79af89aebb7f3

Commit: da2bd4b8e9209088a28f76e993e79af89aebb7f3

Tree: de80d1869b22ebc51f58470d8b7dc7be8003440e

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Rework go to line infrastructure (#23654)

Closes https://github.com/zed-industries/zed/issues/12024


https://github.com/user-attachments/assets/60ea3dbd-b594-4bf5-a44d-4bff925b815f

* Fixes incorrect line selection for certain corner cases

Before:

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/35aaee6c-c120-4bf1-9355-448a29d1b9b5"
/>

After:

<img width="1728" alt="image"
src="https://github.com/user-attachments/assets/abd97339-4594-4e8e-8605-50d74581ae86"
/>


* Reworks https://github.com/zed-industries/zed/pull/16420 to display
selection length with less performance overhead.
Improves the performance more, doing a single selections loop instead of
two.

* Fixes incorrect caret position display when text contains UTF-8 chars
with size > 1
Also fixes tooltop values for this case

* Fixes go to line to treat UTF-8 chars with size > 1 properly when
navigating

* Adds a way to fill go to line text editor with its tooltip on `Tab`

Release Notes:

- Fixed incorrect UTF-8 characters handling in `GoToLine` and caret
position
```

## Parents

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

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