summaryrefslogtreecommitdiff
path: root/poezio
diff options
context:
space:
mode:
Diffstat (limited to 'poezio')
-rw-r--r--poezio/ui/render.py4
-rw-r--r--poezio/ui/types.py5
2 files changed, 4 insertions, 5 deletions
diff --git a/poezio/ui/render.py b/poezio/ui/render.py
index 64b480a9..b695e8f3 100644
--- a/poezio/ui/render.py
+++ b/poezio/ui/render.py
@@ -100,7 +100,7 @@ def build_xmllog(msg: XMLLog, width: int, timestamp: bool, nick_size: int = 10)
def write_pre(msg: BaseMessage, win, with_timestamps: bool, nick_size: int) -> int:
"""Write the part before text (only the timestamp)"""
if with_timestamps:
- return 1 + PreMessageHelpers.write_time(win, False, msg.time)
+ return PreMessageHelpers.write_time(win, False, msg.time)
return 0
@@ -153,7 +153,7 @@ def write_pre_xmllog(msg: XMLLog, win, with_timestamps: bool, nick_size: int) ->
"""Write the part before the stanza (timestamp + IN/OUT)"""
offset = 0
if with_timestamps:
- offset += PreMessageHelpers.write_time(win, False, msg.time)
+ offset += 1 + PreMessageHelpers.write_time(win, False, msg.time)
theme = get_theme()
if msg.incoming:
char = theme.CHAR_XML_IN
diff --git a/poezio/ui/types.py b/poezio/ui/types.py
index 18e51427..6c744ac3 100644
--- a/poezio/ui/types.py
+++ b/poezio/ui/types.py
@@ -48,13 +48,12 @@ class XMLLog(BaseMessage):
def compute_offset(self, with_timestamps: bool, nick_size: int) -> int:
offset = 0
theme = get_theme()
- IN, OUT = theme.CHAR_XML_IN, theme.CHAR_XML_OUT
if with_timestamps:
offset += 1 + SHORT_FORMAT_LENGTH
if self.incoming:
- nick = IN
+ nick = theme.CHAR_XML_IN
else:
- nick = OUT
+ nick = theme.CHAR_XML_OUT
nick = truncate_nick(nick, nick_size) or ''
offset += 1 + len(nick)
return offset