diff options
-rw-r--r-- | poezio/tabs/basetabs.py | 6 | ||||
-rw-r--r-- | poezio/tabs/muctab.py | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py index 135c0b84..a4e9d949 100644 --- a/poezio/tabs/basetabs.py +++ b/poezio/tabs/basetabs.py @@ -323,6 +323,12 @@ class Tab(object): elif not self.size.core_degrade_y: self.core.tab_win.refresh() + def refresh_input(self): + """Refresh the current input if any""" + if self.input is not None: + self.input.refresh() + self.core.doupdate() + def refresh(self): """ Called on each screen refresh (when something has changed) diff --git a/poezio/tabs/muctab.py b/poezio/tabs/muctab.py index 91d8b986..fa08ca55 100644 --- a/poezio/tabs/muctab.py +++ b/poezio/tabs/muctab.py @@ -720,8 +720,7 @@ class MucTab(ChatTab): self.core.disable_private_tabs(self.name, reason=kick_msg) self.disconnect() self.refresh_tab_win() - self.core.current_tab().input.refresh() - self.core.doupdate() + self.core.current_tab().refresh_input() if config.get_by_tabname('autorejoin', self.general_jid): delay = config.get_by_tabname('autorejoin_delay', self.general_jid) @@ -799,8 +798,7 @@ class MucTab(ChatTab): self.core.disable_private_tabs(self.name, reason=kick_msg) self.disconnect() self.refresh_tab_win() - self.core.current_tab().input.refresh() - self.core.doupdate() + self.core.current_tab().refresh_input() # try to auto-rejoin if config.get_by_tabname('autorejoin', self.general_jid): delay = config.get_by_tabname('autorejoin_delay', |