From 80c79d8b791bd659059c2a5c8935b32f7e37edde Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 30 Dec 2012 19:27:59 +0100 Subject: Fix #2189 Fix #2139 - Make /correct work properly in all chat tabs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #2189 wasn’t crashing, but well. Also fix a crash with the separator and /correct --- src/windows.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/windows.py') diff --git a/src/windows.py b/src/windows.py index 1bab7777..c9ba0f61 100644 --- a/src/windows.py +++ b/src/windows.py @@ -945,10 +945,10 @@ class TextWin(Win): (instead of rebuilding everything in order to correct a message) """ with_timestamps = config.get("show_timestamps", 'true') != 'false' - for i in range(len(self.built_lines)-1, 0, -1): - if self.built_lines[i].msg.identifier == old_id: + for i in range(len(self.built_lines)-1, -1, -1): + if self.build_lines[i] and self.built_lines[i].msg.identifier == old_id: index = i - while index > 0 and self.built_lines[index].msg.identifier == old_id: + while index >= 0 and self.built_lines[index].msg.identifier == old_id: self.built_lines.pop(index) index -= 1 index += 1 -- cgit v1.2.3