summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-02-03 23:37:22 +0100
committermathieui <mathieui@mathieui.net>2014-02-03 23:37:22 +0100
commit199ac46d90576062ae21e49cc266d53d1ede8689 (patch)
treec3baad82691faeaac7ba76ff78e652e0c1bf7836
parentfe4404d3f08fee2de08fd2a670b97412c2d70962 (diff)
downloadpoezio-199ac46d90576062ae21e49cc266d53d1ede8689.tar.gz
poezio-199ac46d90576062ae21e49cc266d53d1ede8689.tar.bz2
poezio-199ac46d90576062ae21e49cc266d53d1ede8689.tar.xz
poezio-199ac46d90576062ae21e49cc266d53d1ede8689.zip
Fix #2208 (time_marker shows an useless timestamp)
-rw-r--r--plugins/time_marker.py2
-rw-r--r--src/windows.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/time_marker.py b/plugins/time_marker.py
index b26a6ae7..7a20af8d 100644
--- a/plugins/time_marker.py
+++ b/plugins/time_marker.py
@@ -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='')
diff --git a/src/windows.py b/src/windows.py
index bd6c32bc..ff145d13 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -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])