diff options
author | mathieui <mathieui@mathieui.net> | 2020-05-17 20:42:21 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2020-05-17 20:42:21 +0200 |
commit | 6057d0dc9b7c78090eb2a64e45fd427f5d641131 (patch) | |
tree | 741ddd21118c3bd3a4676d1fbfc6adad47a582ab | |
parent | aec4c279f27564e2e83a4f42b1c626ba50b67f95 (diff) | |
download | poezio-6057d0dc9b7c78090eb2a64e45fd427f5d641131.tar.gz poezio-6057d0dc9b7c78090eb2a64e45fd427f5d641131.tar.bz2 poezio-6057d0dc9b7c78090eb2a64e45fd427f5d641131.tar.xz poezio-6057d0dc9b7c78090eb2a64e45fd427f5d641131.zip |
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)
-rw-r--r-- | poezio/windows/text_win.py | 4 |
1 files 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 |