diff options
author | mathieui <mathieui@mathieui.net> | 2012-12-30 19:27:59 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2012-12-30 19:27:59 +0100 |
commit | 80c79d8b791bd659059c2a5c8935b32f7e37edde (patch) | |
tree | 03a4f8d7b788841ec8e01be3dd86ebb0881aa09e /src/windows.py | |
parent | 5fe494699a3abc0e1c0e53fdb0d6d875a1e0c9f8 (diff) | |
download | poezio-80c79d8b791bd659059c2a5c8935b32f7e37edde.tar.gz poezio-80c79d8b791bd659059c2a5c8935b32f7e37edde.tar.bz2 poezio-80c79d8b791bd659059c2a5c8935b32f7e37edde.tar.xz poezio-80c79d8b791bd659059c2a5c8935b32f7e37edde.zip |
Fix #2189 Fix #2139 - Make /correct work properly in all chat tabs
#2189 wasn’t crashing, but well.
Also fix a crash with the separator and /correct
Diffstat (limited to 'src/windows.py')
-rw-r--r-- | src/windows.py | 6 |
1 files changed, 3 insertions, 3 deletions
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 |