From 8beae901a5088c6e7e5b75c89623e746939dd4f4 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 6 Sep 2023 10:23:01 -0500 Subject: [PATCH] Fix Clone definition for Injector Injectors detect that a Picker has been shut down / removed by checking the shutdown atomic bool (which is shared with the Picker instance and is set to `true` on Picker's Drop). Cloning Injector should create more references to the Picker's atomic bool rather than creating new ones. This should fix global search so that the WalkBuilder halts when the picker is dropped. --- helix-term/src/ui/picker.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-term/src/ui/picker.rs b/helix-term/src/ui/picker.rs index 1f94a72cfae3..a8411f5355d8 100644 --- a/helix-term/src/ui/picker.rs +++ b/helix-term/src/ui/picker.rs @@ -156,7 +156,7 @@ impl Clone for Injector { Injector { dst: self.dst.clone(), editor_data: self.editor_data.clone(), - shutown: Arc::new(AtomicBool::new(false)), + shutown: self.shutown.clone(), } } }