remove the separator when it is at the bottom (unles the user maid M-v)

parent 3ef50faf
...@@ -605,6 +605,8 @@ class MucTab(ChatTab): ...@@ -605,6 +605,8 @@ class MucTab(ChatTab):
def on_gain_focus(self): def on_gain_focus(self):
self._room.set_color_state(theme.COLOR_TAB_CURRENT) self._room.set_color_state(theme.COLOR_TAB_CURRENT)
if self.text_win.built_lines[-1] is None:
self.text_win.remove_line_separator()
curses.curs_set(1) curses.curs_set(1)
def on_scroll_up(self): def on_scroll_up(self):
......
...@@ -536,10 +536,10 @@ class TextWin(Win): ...@@ -536,10 +536,10 @@ class TextWin(Win):
""" """
if self.height <= 0: if self.height <= 0:
return return
if self.pos != 0: if self.pos == 0:
lines = self.built_lines[-self.height-self.pos:-self.pos]
else:
lines = self.built_lines[-self.height:] lines = self.built_lines[-self.height:]
else:
lines = self.built_lines[-self.height-self.pos:-self.pos]
self._win.move(0, 0) self._win.move(0, 0)
with g_lock: with g_lock:
self._win.erase() self._win.erase()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment