summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-08-23 09:48:27 +0200
committerMaxime “pep” Buquet <pep@bouah.net>2019-08-23 09:48:27 +0200
commit65c7deb5858153327a04630f43bfca4ebea557a1 (patch)
treead2b52eadb2e4707ce0b50fd7d2c08d862542fc2
parent5312382f8abf228a9dcd83aec260ae2d939fc200 (diff)
downloadpoezio-65c7deb5858153327a04630f43bfca4ebea557a1.tar.gz
poezio-65c7deb5858153327a04630f43bfca4ebea557a1.tar.bz2
poezio-65c7deb5858153327a04630f43bfca4ebea557a1.tar.xz
poezio-65c7deb5858153327a04630f43bfca4ebea557a1.zip
Add missing top parameter to another build_new_message method
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
-rw-r--r--poezio/windows/text_win.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/poezio/windows/text_win.py b/poezio/windows/text_win.py
index ab3d3aee..f4c78c2c 100644
--- a/poezio/windows/text_win.py
+++ b/poezio/windows/text_win.py
@@ -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: