# Detect file paths that end with \`:\` \(\#3109\) · gitcafe/zed

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

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

Visibility: public

Requested revision: bb85d6f63e86f05696f0d550836378a55e685556

Requested commit: bb85d6f63e86f05696f0d550836378a55e685556

Commit: bb85d6f63e86f05696f0d550836378a55e685556

Tree: 109cb3a26982282c97309ca54147ca266a597c7c

Author: Kirill Bulatov

Committer: GitHub

## Message

````
Detect file paths that end with `:` (#3109)

New rustc messages look like

```
thread 'tests::test_history_items_vs_very_good_external_match' panicked at crates/file_finder/src/file_finder.rs:1902:13:
assertion `left == right` failed: Only one history item contains collab_ui, it should be present and others should be filtered out
  left: 0
 right: 1
```

now and we fail to parse that `13:` bit properly, fix that.

One caveat is that we highlight the entire word including the trailing
`:`:
<img width="914" alt="image"
src="https://github.com/zed-industries/zed/assets/2690773/d653a8ff-3e6e-4e3d-b6ea-dad0c8db0f06">

this is unfortunate, but better than nothing (as now).
This is due to the fact, that we detect words with regex inside the
`terminal.rs` and send events to other place that's able to check paths
for existence (and whether that's a path at all), currently there's no
way to detect a path and sanitize it in `terminal.rs`

Release Notes:

- N/A
````

## Parents

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

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

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