summaryrefslogtreecommitdiff
path: root/src/window.py
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-04 01:03:02 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2010-08-04 01:03:02 +0000
commit567491ba439b5ae1b1f82f3796287d80e2ef653d (patch)
treeb4ab069e24453678c66fffc12a0c2e3bd406fabb /src/window.py
parentd364c1f4f3eae87354993b5bfdb952652ee9b44f (diff)
downloadpoezio-567491ba439b5ae1b1f82f3796287d80e2ef653d.tar.gz
poezio-567491ba439b5ae1b1f82f3796287d80e2ef653d.tar.bz2
poezio-567491ba439b5ae1b1f82f3796287d80e2ef653d.tar.xz
poezio-567491ba439b5ae1b1f82f3796287d80e2ef653d.zip
indicates the number of available lines to be scrolled down fixed #1674
Diffstat (limited to 'src/window.py')
-rw-r--r--src/window.py14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/window.py b/src/window.py
index fd3179ac..76f2b048 100644
--- a/src/window.py
+++ b/src/window.py
@@ -150,6 +150,15 @@ class RoomInfo(Win):
def resize(self, height, width, y, x, stdscr, visible):
self._resize(height, width, y, x, stdscr)
+ def print_scroll_position(self, current_room):
+ """
+ Print, link in Weechat, a -PLUS(n)- where n
+ is the number of available lines to scroll
+ down
+ """
+ if current_room.pos > 0:
+ self.win.addstr(' -PLUS(%s)-' % current_room.pos, curses.color_pair(16) | curses.A_BOLD)
+
def refresh(self, rooms, current):
if not self.visible:
return
@@ -175,6 +184,7 @@ class RoomInfo(Win):
except:
pass
pass
+ self.print_scroll_position(current)
while True:
try:
self.win.addstr(' ', curses.color_pair(1))
@@ -259,10 +269,6 @@ class TextWin(Win):
if not self.visible:
return
self.win.erase()
- # if room.pos != 0:
- # messages = room.messages[-self.height - room.pos : -room.pos]
- # else:
- # messages = room.messages[-self.height:]
lines = self.build_lines_from_messages(room.messages)
if room.pos + self.height > len(lines):
room.pos = len(lines) - self.height