summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2019-12-29 00:18:59 +0100
committermathieui <mathieui@mathieui.net>2020-05-09 19:46:17 +0200
commitc0df35f3b318513e1c0aeb37aa25fa699139dd1e (patch)
treee093a3764f8984fdc8f08a393d0fb555a0f1653b
parent525edff66fab42f472e392ff1b202a239bc3303f (diff)
downloadpoezio-c0df35f3b318513e1c0aeb37aa25fa699139dd1e.tar.gz
poezio-c0df35f3b318513e1c0aeb37aa25fa699139dd1e.tar.bz2
poezio-c0df35f3b318513e1c0aeb37aa25fa699139dd1e.tar.xz
poezio-c0df35f3b318513e1c0aeb37aa25fa699139dd1e.zip
Fix a bug in message edition
(out of bounds access for no reason)
-rw-r--r--poezio/windows/text_win.py3
1 files changed, 2 insertions, 1 deletions
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