Keep selection in SwitchToHelixNormalMode (#41583)
Closes #41125 Release Notes: - Fixed `SwitchToHelixNormalMode` to keep selection - Added default keybinds for `SwitchToHelixNormalMode` when in Helix mode
This commit is contained in:
@@ -104,6 +104,7 @@ pub trait SearchableItem: Item + EventEmitter<SearchEvent> {
|
||||
&mut self,
|
||||
index: usize,
|
||||
matches: &[Self::Match],
|
||||
collapse: bool,
|
||||
window: &mut Window,
|
||||
cx: &mut Context<Self>,
|
||||
);
|
||||
@@ -184,6 +185,7 @@ pub trait SearchableItemHandle: ItemHandle {
|
||||
&self,
|
||||
index: usize,
|
||||
matches: &AnyVec<dyn Send>,
|
||||
collapse: bool,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
);
|
||||
@@ -274,12 +276,13 @@ impl<T: SearchableItem> SearchableItemHandle for Entity<T> {
|
||||
&self,
|
||||
index: usize,
|
||||
matches: &AnyVec<dyn Send>,
|
||||
collapse: bool,
|
||||
window: &mut Window,
|
||||
cx: &mut App,
|
||||
) {
|
||||
let matches = matches.downcast_ref().unwrap();
|
||||
self.update(cx, |this, cx| {
|
||||
this.activate_match(index, matches.as_slice(), window, cx)
|
||||
this.activate_match(index, matches.as_slice(), collapse, window, cx)
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user