From 56bab711924cd7a660c874abf40fd545693f8d98 Mon Sep 17 00:00:00 2001 From: mathieui Date: Thu, 15 Apr 2021 18:26:37 +0200 Subject: fix: display issue when changing show_timestamps value --- poezio/windows/text_win.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'poezio/windows/text_win.py') 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 -- cgit v1.2.3