aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 13eac0a..8eea38e 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -263,7 +263,8 @@ class WeechatWrapper(object):
# number of spaces, so it aligns correctly.
def prnt_date_tags(self, buffer, date, tags, message):
prefix, _, _ = message.partition("\t")
- prefix_spaces = " " * len(weechat.string_remove_color(prefix, ""))
+ prefix = weechat.string_remove_color(encode_to_utf8(prefix), "")
+ prefix_spaces = " " * weechat.strlen_screen(prefix)
message = message.replace("\n", "\n{}\t".format(prefix_spaces))
return self.wrap_for_utf8(self.wrapped_class.prnt_date_tags)(
buffer, date, tags, message