Add missing top parameter to another build_new_message method

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2019-08-23 09:48:27 +02:00
parent 5312382f8a
commit 65c7deb585
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -87,6 +87,7 @@ class BaseTextWin(Win):
clean: bool = True,
highlight: bool = False,
timestamp: bool = False,
top: Optional[bool] = False,
nick_size: int = 10) -> int:
"""
Take one message, build it and add it to the list
@ -96,10 +97,15 @@ class BaseTextWin(Win):
#pylint: disable=assignment-from-no-return
lines = self.build_message(
message, timestamp=timestamp, nick_size=nick_size)
if self.lock:
self.lock_buffer.extend(lines)
if top:
lines.reverse()
for line in lines:
self.built_lines.insert(0, line)
else:
self.built_lines.extend(lines)
if self.lock:
self.lock_buffer.extend(lines)
else:
self.built_lines.extend(lines)
if not lines or not lines[0]:
return 0
if clean: