tests: update tests for vim mode to support search active highlight
This commit is contained in:
parent
cf0b8ebf86
commit
8d9dd2c8de
3 changed files with 3 additions and 13 deletions
|
@ -1196,17 +1196,7 @@ impl BufferSearchBar {
|
|||
SearchEvent::MatchesInvalidated => {
|
||||
drop(self.update_matches(false, window, cx));
|
||||
}
|
||||
SearchEvent::ActiveMatchChanged => {
|
||||
self.update_match_index(window, cx);
|
||||
if let Some(active_item) = self.active_searchable_item.as_ref() {
|
||||
if let Some(matches) = self
|
||||
.searchable_items_with_matches
|
||||
.get(&active_item.downgrade())
|
||||
{
|
||||
active_item.update_matches(matches, window, cx);
|
||||
}
|
||||
}
|
||||
}
|
||||
SearchEvent::ActiveMatchChanged => self.update_match_index(window, cx),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -749,7 +749,7 @@ mod test {
|
|||
|
||||
cx.update_editor(|editor, window, cx| {
|
||||
let highlights = editor.all_text_background_highlights(window, cx);
|
||||
assert_eq!(3, highlights.len());
|
||||
assert_eq!(4, highlights.len());
|
||||
assert_eq!(
|
||||
DisplayPoint::new(DisplayRow(2), 0)..DisplayPoint::new(DisplayRow(2), 2),
|
||||
highlights[0].0
|
||||
|
|
|
@ -273,7 +273,7 @@ async fn test_selection_on_search(cx: &mut gpui::TestAppContext) {
|
|||
|
||||
cx.update_editor(|editor, window, cx| {
|
||||
let highlights = editor.all_text_background_highlights(window, cx);
|
||||
assert_eq!(3, highlights.len());
|
||||
assert_eq!(4, highlights.len());
|
||||
assert_eq!(
|
||||
DisplayPoint::new(DisplayRow(2), 0)..DisplayPoint::new(DisplayRow(2), 2),
|
||||
highlights[0].0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue