scroll_to_separator now scrolls to the top if there’s no separator.

This commit is contained in:
Florent Le Coz 2013-01-29 07:57:48 +01:00
parent 13b5ab4b65
commit e0136e785a

View file

@ -793,6 +793,8 @@ class TextWin(Win):
self.pos = len(self.built_lines) - self.built_lines.index(None) - self.height + 1
if self.pos < 0:
self.pos = 0
else:
self.pos = len(self.built_lines) - self.height + 1
# Chose a proper position (not too high)
self.scroll_up(0)
# Make “next highlight” work afterwards. This makes it easy to