fix a offset size issue that made the text be cut in too short lines.
This commit is contained in:
parent
b7b1faebdb
commit
e6622db4ca
1 changed files with 0 additions and 4 deletions
|
@ -558,17 +558,13 @@ class TextWin(Win):
|
||||||
if nick and len(nick) >= 25:
|
if nick and len(nick) >= 25:
|
||||||
nick = nick[:25]+'…'
|
nick = nick[:25]+'…'
|
||||||
offset = 1 + len(message.str_time)
|
offset = 1 + len(message.str_time)
|
||||||
if nick:
|
|
||||||
offset += wcwidth.wcswidth(nick) + 2 # + nick + spaces length
|
|
||||||
if nick:
|
if nick:
|
||||||
offset += wcwidth.wcswidth(nick) + 2 # + nick + spaces length
|
offset += wcwidth.wcswidth(nick) + 2 # + nick + spaces length
|
||||||
if theme.CHAR_TIME_LEFT:
|
if theme.CHAR_TIME_LEFT:
|
||||||
offset += 1
|
offset += 1
|
||||||
if theme.CHAR_TIME_RIGHT:
|
if theme.CHAR_TIME_RIGHT:
|
||||||
offset += 1
|
offset += 1
|
||||||
|
|
||||||
lines = cut_text(txt, self.width-offset-1)
|
lines = cut_text(txt, self.width-offset-1)
|
||||||
|
|
||||||
first = True
|
first = True
|
||||||
for line in lines:
|
for line in lines:
|
||||||
self.built_lines.append(Line(msg=message,
|
self.built_lines.append(Line(msg=message,
|
||||||
|
|
Loading…
Reference in a new issue