From 15d2420031c311831c54b2228b66ec8ca1c986fc Mon Sep 17 00:00:00 2001 From: 5brian Date: Wed, 19 Mar 2025 00:19:11 -0400 Subject: [PATCH] `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 --- crates/file_finder/src/open_path_prompt.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/crates/file_finder/src/open_path_prompt.rs b/crates/file_finder/src/open_path_prompt.rs index b778328cfbee5f616598a0ef7aaef36aa7aa94f5..aeb774176d7a300b04ebdd6b326f21866d3aa10e 100644 --- a/crates/file_finder/src/open_path_prompt.rs +++ b/crates/file_finder/src/open_path_prompt.rs @@ -266,6 +266,7 @@ impl PickerDelegate for OpenPathDelegate { *m, ) }); + this.delegate.selected_index = 0; cx.notify(); }) .ok();