From 0cb595e226c9970989ee1e680ae6b8011d188cbf Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Wed, 30 Aug 2023 06:26:21 +0200 Subject: transition to nucleo for fuzzy matching (#7814) * transition to nucleo for fuzzy matching * drop flakey test case since the picker streams in results now any test that relies on the picker containing results is potentially flakely * use crates.io version of nucleo * Fix typo in commands.rs Co-authored-by: Skyler Hawthorne --------- Co-authored-by: Skyler Hawthorne --- helix-vcs/src/diff/worker.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'helix-vcs/src/diff/worker.rs') diff --git a/helix-vcs/src/diff/worker.rs b/helix-vcs/src/diff/worker.rs index 5406446f..3a9b6462 100644 --- a/helix-vcs/src/diff/worker.rs +++ b/helix-vcs/src/diff/worker.rs @@ -23,7 +23,6 @@ pub(super) struct DiffWorker { pub channel: UnboundedReceiver, pub diff: Arc>, pub new_hunks: Vec, - pub redraw_notify: Arc, pub diff_finished_notify: Arc, } @@ -32,11 +31,7 @@ impl DiffWorker { let mut accumulator = EventAccumulator::new(); accumulator.handle_event(event).await; accumulator - .accumulate_debounced_events( - &mut self.channel, - self.redraw_notify.clone(), - self.diff_finished_notify.clone(), - ) + .accumulate_debounced_events(&mut self.channel, self.diff_finished_notify.clone()) .await; (accumulator.doc, accumulator.diff_base) } @@ -137,7 +132,6 @@ impl<'a> EventAccumulator { async fn accumulate_debounced_events( &mut self, channel: &mut UnboundedReceiver, - redraw_notify: Arc, diff_finished_notify: Arc, ) { let async_debounce = Duration::from_millis(DIFF_DEBOUNCE_TIME_ASYNC); @@ -164,7 +158,7 @@ impl<'a> EventAccumulator { None => { tokio::spawn(async move { diff_finished_notify.notified().await; - redraw_notify.notify_one(); + helix_event::request_redraw(); }); } // diff is performed inside the rendering loop @@ -190,7 +184,7 @@ impl<'a> EventAccumulator { // and wait until the diff occurs to trigger an async redraw log::info!("Diff computation timed out, update of diffs might appear delayed"); diff_finished_notify.notified().await; - redraw_notify.notify_one(); + helix_event::request_redraw() }); } // a blocking diff is performed inside the rendering loop -- cgit v1.2.3-70-g09d2