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-18 22:19:11 -06:00
committed by GitHub
co-authored by Conrad Irwin
parent 026c7274d9
commit 15d2420031
@@ -266,6 +266,7 @@ impl PickerDelegate for OpenPathDelegate {
*m,
)
});
this.delegate.selected_index = 0;
cx.notify();
})
.ok();