Skip to content

Commit

Permalink
Fix Clone definition for Injector
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
the-mikedavis committed Sep 6, 2023
1 parent e6cdc5f commit 8beae90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/ui/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ impl<T: Item> Clone for Injector<T> {
Injector {
dst: self.dst.clone(),
editor_data: self.editor_data.clone(),
shutown: Arc::new(AtomicBool::new(false)),
shutown: self.shutown.clone(),
}
}
}
Expand Down

0 comments on commit 8beae90

Please sign in to comment.