summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/windows.py b/src/windows.py
index ccd8d9b0..beaca819 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -793,13 +793,15 @@ class TextWin(Win):
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)
- # Make “next highlight” work afterwards. This makes it easy to
- # review all the highlights since the separator was placed, in
- # the correct order.
- self.hl_pos = len(self.highlights) - self.nb_of_highlights_after_separator - 1
- log.debug("self.hl_pos = %s" % self.hl_pos)
+ 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
+ # review all the highlights since the separator was placed, in
+ # the correct order.
+ self.hl_pos = len(self.highlights) - self.nb_of_highlights_after_separator - 1
+ log.debug("self.hl_pos = %s" % self.hl_pos)
def remove_line_separator(self):
"""