summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2012-05-17 17:15:15 +0200
committermathieui <mathieui@mathieui.net>2012-05-17 17:15:15 +0200
commit3411d8ca83591adf9a92b3c1c78fbd74a4612fe7 (patch)
tree5b98602736bc9e55aabb9c238f92cfc295942bbe /src/windows.py
parent0f8a5abdc0818b4071bf4623a12ee95223b11ba3 (diff)
downloadpoezio-3411d8ca83591adf9a92b3c1c78fbd74a4612fe7.tar.gz
poezio-3411d8ca83591adf9a92b3c1c78fbd74a4612fe7.tar.bz2
poezio-3411d8ca83591adf9a92b3c1c78fbd74a4612fe7.tar.xz
poezio-3411d8ca83591adf9a92b3c1c78fbd74a4612fe7.zip
Add a shortcut to go to the first unread message (separator) with M-p
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/windows.py b/src/windows.py
index e5973ec9..29bf5953 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -731,11 +731,11 @@ class TextWin(Win):
present, scroll at the top of the window
"""
if None in self.built_lines:
- self.pos = self.built_lines.index(None)
+ self.pos = len(self.built_lines) - self.built_lines.index(None) - self.height + 1
+ if self.pos < 0:
+ self.pos = 0
# Chose a proper position (not too high)
self.scroll_up(0)
- else: # Go at the top of the win
- self.pos = len(self.built_lines) - self.height
def remove_line_separator(self):
"""