vim: Fix search in the Assistant (#20258)
Closes #17704 Release Notes: - vim: Fix search in the assistant panel
This commit is contained in:
parent
c527f2e212
commit
4bf6fb217e
5 changed files with 48 additions and 17 deletions
|
@ -3219,6 +3219,21 @@ impl Workspace {
|
|||
&self.active_pane
|
||||
}
|
||||
|
||||
pub fn focused_pane(&self, cx: &WindowContext) -> View<Pane> {
|
||||
for dock in [&self.left_dock, &self.right_dock, &self.bottom_dock] {
|
||||
if dock.focus_handle(cx).contains_focused(cx) {
|
||||
if let Some(pane) = dock
|
||||
.read(cx)
|
||||
.active_panel()
|
||||
.and_then(|panel| panel.pane(cx))
|
||||
{
|
||||
return pane;
|
||||
}
|
||||
}
|
||||
}
|
||||
self.active_pane().clone()
|
||||
}
|
||||
|
||||
pub fn adjacent_pane(&mut self, cx: &mut ViewContext<Self>) -> View<Pane> {
|
||||
self.find_pane_in_direction(SplitDirection::Right, cx)
|
||||
.or_else(|| self.find_pane_in_direction(SplitDirection::Left, cx))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue