1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-27 12:23:46 +03:00

gui: avoid closing pty pane when double-activating search overlay

This is another variation on dcb6fec28f

refs: #572
This commit is contained in:
Wez Furlong 2021-03-22 08:35:10 -07:00
parent a5f4803b0b
commit 4fa85e7037

View File

@ -1828,14 +1828,19 @@ impl TermWindow {
pub fn assign_overlay_for_pane(&mut self, pane_id: PaneId, overlay: Rc<dyn Pane>) {
if let Some(prior) = self.pane_state(pane_id).overlay.replace(overlay) {
Mux::get().unwrap().remove_pane(prior.pane_id());
if pane_id != prior.pane_id() {
Mux::get().unwrap().remove_pane(prior.pane_id());
}
}
self.update_title();
}
pub fn assign_overlay(&mut self, tab_id: TabId, overlay: Rc<dyn Pane>) {
let pane_id = overlay.pane_id();
if let Some(prior) = self.tab_state(tab_id).overlay.replace(overlay) {
Mux::get().unwrap().remove_pane(prior.pane_id());
if pane_id != prior.pane_id() {
Mux::get().unwrap().remove_pane(prior.pane_id());
}
}
self.update_title();
}