summaryrefslogtreecommitdiff
path: root/poezio/windows/text_win.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/windows/text_win.py')
-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: