terminal/search: Partially fix search in terminal.

There are two issues with search in terminal as is:
- terminal's pane is not registered as a "legit" pane, so we dispatch buffer search bar::Deploy on the most recent "legit" pane. By legit I mean that
  workspace::active_pane will *never* return terminal pane as active.
- We've had the implementation of as_searchable commented out. Duh!

This commit fixes second issue. That means that if you drag the terminal over to the main editor pane (so that it's in a "legit" pane), it'll work. 1st issue still stands though.
This commit is contained in:
Piotr Osiewicz 2024-01-04 12:17:38 +01:00
parent 3f06a05060
commit b3d8b23139
4 changed files with 9 additions and 9 deletions

View file

@ -101,9 +101,9 @@ impl TerminalPanel {
})
.into_any_element()
});
// let buffer_search_bar = cx.build_view(search::BufferSearchBar::new);
// pane.toolbar()
// .update(cx, |toolbar, cx| toolbar.add_item(buffer_search_bar, cx));
let buffer_search_bar = cx.add_view(search::BufferSearchBar::new);
pane.toolbar()
.update(cx, |toolbar, cx| toolbar.add_item(buffer_search_bar, cx));
pane
});
let subscriptions = vec![