From 21511cf5274934ffc4f5b0ca1d2906c8d6d2c2da Mon Sep 17 00:00:00 2001 From: Conrad Ludgate Date: Tue, 11 Apr 2023 09:33:51 +0100 Subject: [PATCH] fast --- src/command/client/search/history_list.rs | 4 +++- src/command/client/search/interactive.rs | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/command/client/search/history_list.rs b/src/command/client/search/history_list.rs index f9cd9c8b..e2aecee9 100644 --- a/src/command/client/search/history_list.rs +++ b/src/command/client/search/history_list.rs @@ -172,7 +172,9 @@ impl DrawState<'_> { let selected = self.y as usize + self.state.offset == self.state.selected; let with_select = move |style: Style| { if selected { - style.bg(theme.selection).add_modifier(Modifier::BOLD) + style + .add_modifier(Modifier::BOLD) + .add_modifier(Modifier::UNDERLINED) } else { style } diff --git a/src/command/client/search/interactive.rs b/src/command/client/search/interactive.rs index f5a45a8a..15b08fb0 100644 --- a/src/command/client/search/interactive.rs +++ b/src/command/client/search/interactive.rs @@ -64,7 +64,7 @@ impl State { fn highlight_results(&mut self, results: &[History]) -> bool { let start = Instant::now(); for h in results { - if start.elapsed() > Duration::from_millis(10) { + if start.elapsed() > Duration::from_millis(5) { return true; } self.results_parsed @@ -582,7 +582,7 @@ pub async fn history( // if we didn't get around to highlighting all the results, we should consider // triggering a re-draw sooner. let wait = if highlight_interrupted { - Duration::from_millis(10) + Duration::from_millis(5) } else { Duration::from_millis(250) };