# \`workspace::Open\`: Fix trapped cursor/selection on update \(\#25402\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 15d2420031c311831c54b2228b66ec8ca1c986fc

Requested commit: 15d2420031c311831c54b2228b66ec8ca1c986fc

Commit: 15d2420031c311831c54b2228b66ec8ca1c986fc

Tree: b5ad02168318f2f97d3fd663edf0bcfb161523cb

Author: 5brian

Committer: GitHub

## Message

```
`workspace::Open`: Fix trapped cursor/selection on update (#25402)

Closes #ISSUE

Issue: Selection index does not reset when the matches update, which can
lead to the selection getting trapped when that index does not exist in
the next matches.


https://github.com/user-attachments/assets/d3fab23f-750c-47fb-bd3b-a0c42f214c83

This is in workspace::Open with   "use_system_path_prompts": false

Release Notes:

- N/A

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
```

## Parents

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

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