summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--poezio/tabs/basetabs.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/poezio/tabs/basetabs.py b/poezio/tabs/basetabs.py
index 0732ae73..3921e45c 100644
--- a/poezio/tabs/basetabs.py
+++ b/poezio/tabs/basetabs.py
@@ -959,7 +959,13 @@ class ChatTab(Tab):
return self.text_win.scroll_down(1)
def on_scroll_up(self):
- return self.text_win.scroll_up(self.text_win.height - 1)
+ self.text_win.pos += self.text_win.height - 1
+ pos = len(self.text_win.built_lines) - self.text_win.height - self.text_win.pos
+ if pos < 0:
+ mam.mam_scroll(self)
+ self.text_win.pos = 0
+ else:
+ return self.text_win.scroll_up(self.text_win.height - 1)
def on_scroll_down(self):
return self.text_win.scroll_down(self.text_win.height - 1)