diff --git a/crates/picker/src/picker.rs b/crates/picker/src/picker.rs index 90423bcace..d9a23ec93b 100644 --- a/crates/picker/src/picker.rs +++ b/crates/picker/src/picker.rs @@ -275,6 +275,15 @@ impl Picker { Self::new(delegate, ContainerKind::UniformList, head, window, cx) } + /// A picker, which displays its matches using `gpui::list`, matches can have different heights. + /// The picker allows the user to perform search items by text. + /// If `PickerDelegate::render_match` only returns items with the same height, use `Picker::uniform_list` as its implementation is optimized for that. + pub fn nonsearchable_list(delegate: D, window: &mut Window, cx: &mut Context) -> Self { + let head = Head::empty(Self::on_empty_head_blur, window, cx); + + Self::new(delegate, ContainerKind::List, head, window, cx) + } + /// A picker, which displays its matches using `gpui::list`, matches can have different heights. /// The picker allows the user to perform search items by text. /// If `PickerDelegate::render_match` only returns items with the same height, use `Picker::uniform_list` as its implementation is optimized for that. diff --git a/crates/tab_switcher/src/tab_switcher.rs b/crates/tab_switcher/src/tab_switcher.rs index 2923ee6dd4..8b582796b3 100644 --- a/crates/tab_switcher/src/tab_switcher.rs +++ b/crates/tab_switcher/src/tab_switcher.rs @@ -155,9 +155,9 @@ impl TabSwitcher { Self { picker: cx.new(|cx| { if is_global { - Picker::uniform_list(delegate, window, cx) + Picker::list(delegate, window, cx) } else { - Picker::nonsearchable_uniform_list(delegate, window, cx) + Picker::nonsearchable_list(delegate, window, cx) } }), init_modifiers,