Skip to content

Commit

Permalink
fix(picker): apply filter on startup when provided
Browse files Browse the repository at this point in the history
  • Loading branch information
EdenEast committed Dec 29, 2024
1 parent 7bbc345 commit 19c1672
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ui/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ impl Picker {
let mut tui = Tui::new(terminal, events);
tui.enter()?;

if !self.filter.is_empty() {
self.cursor_pos = self.filter.len() as u16;
self.update_matcher_pattern("");
}

let mut selection = None;
while !self.should_exit {
tui.draw(&mut self)?;
Expand Down

0 comments on commit 19c1672

Please sign in to comment.