From 009bbdaf8dc076178cc888cfaa1513bf1baa35f5 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Tue, 23 Apr 2024 20:25:56 -0400 Subject: [PATCH] Picker: Reset the cursor on prompt change --- helix-term/src/ui/picker.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index ebc06cc02..c65e839cb 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -512,6 +512,8 @@ impl Picker { if self.query == old_query { return; } + // If the query has meaningfully changed, reset the cursor to the top of the results. + self.cursor = 0; // Have nucleo reparse each changed column. for (i, column) in self .columns