fix(plugins): make hide_self api idempotent (#2568)
* fix(plugins): make hide_self api idempotent * style(fmt): rustfmt
This commit is contained in:
parent
4fc30ee7ad
commit
019452bdbf
2 changed files with 4 additions and 1 deletions
|
|
@ -2779,7 +2779,7 @@ pub(crate) fn screen_thread_main(
|
|||
ScreenInstruction::SuppressPane(pane_id, client_id) => {
|
||||
let all_tabs = screen.get_tabs_mut();
|
||||
for tab in all_tabs.values_mut() {
|
||||
if tab.has_pane_with_pid(&pane_id) {
|
||||
if tab.has_non_suppressed_pane_with_pid(&pane_id) {
|
||||
tab.suppress_pane(pane_id, client_id);
|
||||
drop(screen.render());
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -1308,6 +1308,9 @@ impl Tab {
|
|||
|| self.floating_panes.panes_contain(pid)
|
||||
|| self.suppressed_panes.values().any(|s_p| s_p.pid() == *pid)
|
||||
}
|
||||
pub fn has_non_suppressed_pane_with_pid(&self, pid: &PaneId) -> bool {
|
||||
self.tiled_panes.panes_contain(pid) || self.floating_panes.panes_contain(pid)
|
||||
}
|
||||
pub fn handle_pty_bytes(&mut self, pid: u32, bytes: VteBytes) -> Result<()> {
|
||||
if self.is_pending {
|
||||
self.pending_instructions
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue