Remove "top" message logic
This commit is contained in:
parent
e488b75737
commit
b7423ee43b
3 changed files with 4 additions and 11 deletions
|
@ -163,8 +163,7 @@ class TextBuffer:
|
||||||
nick_size=nick_size)
|
nick_size=nick_size)
|
||||||
if ret_val == 0:
|
if ret_val == 0:
|
||||||
ret_val = nb
|
ret_val = nb
|
||||||
top = isinstance(msg, Message) and msg.top
|
if window.pos != 0:
|
||||||
if window.pos != 0 and top is False:
|
|
||||||
window.scroll_up(nb)
|
window.scroll_up(nb)
|
||||||
|
|
||||||
return min(ret_val, 1)
|
return min(ret_val, 1)
|
||||||
|
|
|
@ -94,8 +94,6 @@ def build_message(msg: Message, width: int, timestamp: bool, nick_size: int = 10
|
||||||
offset = msg.compute_offset(timestamp, nick_size)
|
offset = msg.compute_offset(timestamp, nick_size)
|
||||||
lines = poopt.cut_text(txt, width - offset - 1)
|
lines = poopt.cut_text(txt, width - offset - 1)
|
||||||
generated_lines = generate_lines(lines, msg, default_color='')
|
generated_lines = generate_lines(lines, msg, default_color='')
|
||||||
if msg.top:
|
|
||||||
generated_lines.reverse()
|
|
||||||
return generated_lines
|
return generated_lines
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -95,10 +95,6 @@ class TextWin(Win):
|
||||||
lines = build_lines(
|
lines = build_lines(
|
||||||
message, self.width, timestamp=timestamp, nick_size=nick_size
|
message, self.width, timestamp=timestamp, nick_size=nick_size
|
||||||
)
|
)
|
||||||
if isinstance(message, Message) and message.top:
|
|
||||||
for line in lines:
|
|
||||||
self.built_lines.insert(0, line)
|
|
||||||
else:
|
|
||||||
if self.lock:
|
if self.lock:
|
||||||
self.lock_buffer.extend(lines)
|
self.lock_buffer.extend(lines)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue