mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-25 01:34:02 +00:00
Fix bugs in file finder (#4234)
* Fixed jumping of list item when the separator appeared and disappeared. * Fixed a bug where the selection got into a valid state when updating the matches Release Notes: - Fixed an issue where the file finder's selection got into a state where nothing was selected after filtering the matches.
This commit is contained in:
commit
26c901e2f2
4 changed files with 1242 additions and 1237 deletions
File diff suppressed because it is too large
Load diff
1227
crates/file_finder/src/file_finder_tests.rs
Normal file
1227
crates/file_finder/src/file_finder_tests.rs
Normal file
File diff suppressed because it is too large
Load diff
|
@ -5,7 +5,7 @@ use gpui::{
|
|||
View, ViewContext, WindowContext,
|
||||
};
|
||||
use std::sync::Arc;
|
||||
use ui::{prelude::*, v_flex, Color, Divider, Label, ListItem, ListItemSpacing, ListSeparator};
|
||||
use ui::{prelude::*, v_flex, Color, Divider, Label, ListItem, ListItemSpacing};
|
||||
use workspace::ModalView;
|
||||
|
||||
pub struct Picker<D: PickerDelegate> {
|
||||
|
@ -296,7 +296,12 @@ impl<D: PickerDelegate> Render for Picker<D> {
|
|||
ix,
|
||||
ix == selected_index,
|
||||
cx,
|
||||
)).when(separators_after_indices.contains(&ix), |picker| picker.child(ListSeparator))
|
||||
)).when(separators_after_indices.contains(&ix), |picker| {
|
||||
picker
|
||||
.border_color(cx.theme().colors().border_variant)
|
||||
.border_b_1()
|
||||
.pb(px(-1.0))
|
||||
})
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ extend-exclude = [
|
|||
# Vim makes heavy use of partial typing tables
|
||||
"crates/vim/*",
|
||||
# Editor and file finder rely on partial typing and custom in-string syntax
|
||||
"crates/file_finder/src/file_finder.rs",
|
||||
"crates/file_finder/src/file_finder_tests.rs",
|
||||
"crates/editor/src/editor_tests.rs",
|
||||
# :/
|
||||
"crates/collab/migrations/20231009181554_add_release_channel_to_rooms.sql",
|
||||
|
|
Loading…
Reference in a new issue