make sure tabs are updated when closing panes (#757)

* call update_tabs on closing panes

* screen: avoid explit render after update_tabs

update_tabs causes a render anyway, by updating plugins, and after that
a render is requested.
This commit is contained in:
Thomas Linford 2021-10-07 13:41:06 +02:00 committed by GitHub
parent 4ca8a2b327
commit 04fb9de8fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -630,7 +630,7 @@ pub(crate) fn screen_thread_main(
}
ScreenInstruction::CloseFocusedPane => {
screen.get_active_tab_mut().unwrap().close_focused_pane();
screen.render();
screen.update_tabs();
}
ScreenInstruction::SetSelectable(id, selectable, tab_index) => {
screen.get_indexed_tab_mut(tab_index).map_or_else(
@ -646,7 +646,7 @@ pub(crate) fn screen_thread_main(
}
ScreenInstruction::ClosePane(id) => {
screen.get_active_tab_mut().unwrap().close_pane(id);
screen.render();
screen.update_tabs();
}
ScreenInstruction::ToggleActiveTerminalFullscreen => {
screen