Commit 6057d0dc authored by mathieui's avatar mathieui

Fix a corner case with correction when moving between highlights

(there are still a few but this one would wipe all other highlights,
making it a bit painful)
parent aec4c279
......@@ -243,7 +243,7 @@ class TextWin(Win):
try:
pos = self.built_lines.index(hl)
except ValueError:
self.highlights = self.highlights[self.hl_pos + 1:]
del self.highlights[self.hl_pos]
if not self.highlights:
self.hl_pos = float('nan')
self.pos = 0
......@@ -277,7 +277,7 @@ class TextWin(Win):
try:
pos = self.built_lines.index(hl)
except ValueError:
self.highlights = self.highlights[self.hl_pos + 1:]
del self.highlights[self.hl_pos]
if not self.highlights:
self.hl_pos = float('nan')
self.pos = 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment