Commit 199ac46d authored by mathieui's avatar mathieui

Fix #2208 (time_marker shows an useless timestamp)

parent fe4404d3
......@@ -79,6 +79,6 @@ class Plugin(BasePlugin):
if last_message_date:
delta = datetime.now() - last_message_date
if delta >= timedelta(0, self.config.get('delay', 900)):
tab.add_message("%s passed…" % (format_timedelta(delta),))
tab.add_message("%s passed…" % (format_timedelta(delta),), str_time='')
......@@ -967,7 +967,7 @@ class TextWin(Win):
else:
self.write_text(y,
# Offset for the timestamp (if any) plus a space after it
(0 if not with_timestamps else (len(line.msg.str_time) + 1)) +
(0 if not with_timestamps else (len(line.msg.str_time) + (1 if line.msg.str_time else 0) )) +
# Offset for the nickname (if any) plus a space and a > after it
(0 if not line.msg.nickname else (poopt.wcswidth(truncate_nick(line.msg.nickname)) + (3 if line.msg.me else 2) + ceil(log10(line.msg.revisions + 1)))),
line.prepend+line.msg.txt[line.start_pos:line.end_pos])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment