# util: Fix edge case when parsing paths \(\#36025\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c48197b2804a17ecf8ec46781985d4f9cff35e11

Requested commit: c48197b2804a17ecf8ec46781985d4f9cff35e11

Commit: c48197b2804a17ecf8ec46781985d4f9cff35e11

Tree: 5c75443d99f1b4d9c77a523345d2f62f4d38c70d

Author: Hendrik Müller

Committer: GitHub

## Message

```
util: Fix edge case when parsing paths (#36025)

Searching for files broke a couple releases ago. It used to be possible
to start typing part of a file name, then select a file (not confirm it
yet) and then type in `:` and a line number to navigate directly to that
line.
The current behavior can be seen in the following screenshots. When the
`:` is typed, the selection is lost, since no files match any more.
<img width="552" height="370" alt="Screenshot From 2025-08-12 10-36-08"
src="https://github.com/user-attachments/assets/e4b4b613-7f0c-40d7-94c9-04d8ab541656"
/>
<img width="553" height="124" alt="Screenshot From 2025-08-12 10-36-25"
src="https://github.com/user-attachments/assets/843e9ecf-9e08-4fa6-9340-0388a957cbb2"
/>
<img width="549" height="370" alt="Screenshot From 2025-08-12 10-36-47"
src="https://github.com/user-attachments/assets/4a1bbbd8-268a-4ea8-999f-6cef1eb34a45"
/>

---

With this PR, the previous behavior is restored and can be seen in these
screenshots:

<img width="552" height="370" alt="Screenshot From 2025-08-12 10-36-08"
src="https://github.com/user-attachments/assets/466e1906-4735-47ae-a699-117bdd6490ca"
/>
<img width="549" height="370" alt="Screenshot From 2025-08-12 10-47-07"
src="https://github.com/user-attachments/assets/17f3acda-662d-4962-9eb8-4b494f211d26"
/>
<img width="549" height="370" alt="Screenshot From 2025-08-12 10-47-21"
src="https://github.com/user-attachments/assets/d98447fe-7377-4f4f-b3da-f690cd44c141"
/>

---

Release Notes:

- Adjusted the file finder to show matching file paths when adding the
`:row:column` to the query
```

## Parents

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

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