From 6057d0dc9b7c78090eb2a64e45fd427f5d641131 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 17 May 2020 20:42:21 +0200 Subject: 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) --- poezio/windows/text_win.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py index fbe3d2fa..9e6641f7 100644 --- a/poezio/windows/text_win.py +++ b/poezio/windows/text_win.py @@ -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 -- cgit v1.2.3