diff options
author | mathieui <mathieui@mathieui.net> | 2014-04-23 20:05:02 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-04-23 20:05:02 +0200 |
commit | efa6b4254df75a3c3fb41398f4efe020bd9a87b1 (patch) | |
tree | f6349db12d55298d9b06387ee8f28595317a9548 /src | |
parent | 2b63e76ef9459dc0d016f58ade6526504f458683 (diff) | |
download | poezio-efa6b4254df75a3c3fb41398f4efe020bd9a87b1.tar.gz poezio-efa6b4254df75a3c3fb41398f4efe020bd9a87b1.tar.bz2 poezio-efa6b4254df75a3c3fb41398f4efe020bd9a87b1.tar.xz poezio-efa6b4254df75a3c3fb41398f4efe020bd9a87b1.zip |
Fix #2450 (redraw top-scrolled tabs properly after resize)
Diffstat (limited to 'src')
-rw-r--r-- | src/windows.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/windows.py b/src/windows.py index 81c772f1..05c073e0 100644 --- a/src/windows.py +++ b/src/windows.py @@ -1053,6 +1053,15 @@ class TextWin(Win): if room and self.width != old_width: self.rebuild_everything(room) + # reposition the scrolling after resize + # (see #2450) + buf_size = len(self.built_lines) + if buf_size - self.pos < self.height: + self.pos = buf_size - self.height + if self.pos < 0: + self.pos = 0 + + def rebuild_everything(self, room): self.built_lines = [] with_timestamps = config.get("show_timestamps", True) |