# terminal_view: Fix cursor column for non-ASCII lines when opening path-like targets \(\#61036\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 3565c49dad884e8437b86a1b1beaa76bfac67fc3

Requested commit: 3565c49dad884e8437b86a1b1beaa76bfac67fc3

Commit: 3565c49dad884e8437b86a1b1beaa76bfac67fc3

Tree: 7aa872b8d9f33313975762495c58e7917481d0e2

Author: Smit Barmase

Committer: GitHub

## Message

```
terminal_view: Fix cursor column for non-ASCII lines when opening path-like targets (#61036)

Found this while looking into a markdown preview issue. Clicking a
`path:row:column` target in the terminal treated the column as a byte
offset, so on lines with non-ASCII characters the cursor landed at mid
codepoint.

The real fix is just 3 lines and the rest is a refactor that extracts
the open and navigate logic so it can be reused later for cases like
markdown preview.

Release Notes:

- Fixed the cursor landing at the wrong column when clicking a
`path:row:column` link in the terminal for lines containing non-ASCII
characters.
```

## Parents

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

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