Skip to content

Commit

Permalink
Picker: Reset the cursor on prompt change
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis committed Jul 15, 2024
1 parent 8555248 commit 009bbda
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions helix-term/src/ui/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ impl<T: 'static + Send + Sync, D: 'static + Send + Sync> Picker<T, D> {
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
Expand Down

0 comments on commit 009bbda

Please sign in to comment.