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)
This commit is contained in:
parent
aec4c279f2
commit
6057d0dc9b
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue