From c0df35f3b318513e1c0aeb37aa25fa699139dd1e Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 29 Dec 2019 00:18:59 +0100 Subject: Fix a bug in message edition (out of bounds access for no reason) --- poezio/windows/text_win.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py index ce52e29d..a1b12ae9 100644 --- a/poezio/windows/text_win.py +++ b/poezio/windows/text_win.py @@ -328,7 +328,8 @@ class TextWin(Win): ): self.built_lines.pop(index) index -= 1 - current = self.built_lines[index] + if index >= 0: + current = self.built_lines[index] index += 1 lines = build_lines( message, self.width, timestamp=with_timestamps, nick_size=nick_size -- cgit v1.2.3