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>
This commit is contained in:
5brian 2025-03-19 00:19:11 -04:00 committed by GitHub
parent 026c7274d9
commit 15d2420031
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -266,6 +266,7 @@ impl PickerDelegate for OpenPathDelegate {
*m,
)
});
this.delegate.selected_index = 0;
cx.notify();
})
.ok();