diff options
Diffstat (limited to 'poezio/windows/text_win.py')
-rw-r--r-- | poezio/windows/text_win.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py index 31dfb637..12d90e7d 100644 --- a/poezio/windows/text_win.py +++ b/poezio/windows/text_win.py @@ -146,14 +146,15 @@ class TextWin(Win): """ self.addstr_colored(txt, y, x) - def resize(self, height: int, width: int, y: int, x: int, room: TextBuffer=None) -> None: + def resize(self, height: int, width: int, y: int, x: int, + room: Optional[TextBuffer] = None, force: bool = False) -> None: old_width: Optional[int] if hasattr(self, 'width'): old_width = self.width else: old_width = None self._resize(height, width, y, x) - if room and self.width != old_width: + if room and (self.width != old_width or force): self.rebuild_everything(room) # reposition the scrolling after resize |