diff options
author | mathieui <mathieui@mathieui.net> | 2015-11-23 19:42:34 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2015-11-23 19:42:34 +0100 |
commit | fa98b548d043fd93041387903f9581b39bdbc344 (patch) | |
tree | 101d017efe6dfee49b5168ddd8fc0a363d138b13 /src | |
parent | 9fc20d4f86f6e1c31a7648072d61112bdea91c58 (diff) | |
download | poezio-fa98b548d043fd93041387903f9581b39bdbc344.tar.gz poezio-fa98b548d043fd93041387903f9581b39bdbc344.tar.bz2 poezio-fa98b548d043fd93041387903f9581b39bdbc344.tar.xz poezio-fa98b548d043fd93041387903f9581b39bdbc344.zip |
Fix nick-less message timestamps
(broken in previous commit)
Diffstat (limited to 'src')
-rw-r--r-- | src/windows/text_win.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/windows/text_win.py b/src/windows/text_win.py index cc4b5189..dda33f3e 100644 --- a/src/windows/text_win.py +++ b/src/windows/text_win.py @@ -376,9 +376,13 @@ class TextWin(BaseTextWin): def write_pre_msg(self, msg, with_timestamps, nick_size): offset = 0 + if with_timestamps: + offset += self.write_time(msg.str_time) + + if msg.nickname is None: # not a message, nothing to do afterwards + return offset + nick = truncate_nick(msg.nickname, nick_size) - if nick is None: - return 0 offset += poopt.wcswidth(nick) if msg.nick_color: color = msg.nick_color @@ -386,8 +390,6 @@ class TextWin(BaseTextWin): color = msg.user.color else: color = None - if with_timestamps: - offset += self.write_time(msg.str_time) if msg.ack: if msg.ack > 0: offset += self.write_ack() |