summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/data_forms.py1
-rw-r--r--src/tabs.py6
-rw-r--r--src/windows.py9
3 files changed, 11 insertions, 5 deletions
diff --git a/src/data_forms.py b/src/data_forms.py
index dc532b87..176c4669 100644
--- a/src/data_forms.py
+++ b/src/data_forms.py
@@ -63,6 +63,7 @@ class DataFormsTab(Tab):
self.form_win.on_input(key)
def resize(self):
+ self.need_resize = False
self.topic_win.resize(1, self.width, 0, 0)
self.tab_win.resize(1, self.width, self.height-2, 0)
self.form_win.resize(self.height-4, self.width, 1, 0)
diff --git a/src/tabs.py b/src/tabs.py
index 6c819138..257b7bd5 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -680,6 +680,7 @@ class MucTab(ChatTab):
"""
if not self.visible:
return
+ self.need_resize = False
text_width = (self.width//10)*9
self.topic_win.resize(1, self.width, 0, 0)
self.v_separator.resize(self.height-3, 1, 1, 9*(self.width//10))
@@ -1035,6 +1036,7 @@ class PrivateTab(ChatTab):
def resize(self):
if self.core.information_win_size >= self.height-3 or not self.visible:
return
+ self.need_resize = False
self.text_win.resize(self.height-3-self.core.information_win_size, self.width, 0, 0)
self.text_win.rebuild_everything(self._room)
self.info_header.resize(1, self.width, self.height-3-self.core.information_win_size, 0)
@@ -1184,6 +1186,7 @@ class RosterInfoTab(Tab):
def resize(self):
if not self.visible:
return
+ self.need_resize = False
roster_width = self.width//2
info_width = self.width-roster_width-1
self.v_separator.resize(self.height-2, 1, 0, roster_width)
@@ -1540,6 +1543,7 @@ class ConversationTab(ChatTab):
def resize(self):
if self.core.information_win_size >= self.height-3 or not self.visible:
return
+ self.need_resize = False
self.text_win.resize(self.height-4-self.core.information_win_size, self.width, 1, 0)
self.text_win.rebuild_everything(self._room)
self.upper_bar.resize(1, self.width, 0, 0)
@@ -1657,6 +1661,7 @@ class MucListTab(Tab):
def resize(self):
if not self.visible:
return
+ self.need_resize = False
self.upper_message.resize(1, self.width, 0, 0)
column_size = {'node-part': (self.width-5)//4,
'name': (self.width-5)//4*3,
@@ -1791,6 +1796,7 @@ class SimpleTextTab(Tab):
def resize(self):
if not self.visible:
return
+ self.need_resize = False
self.text_win.resize(self.height-2, self.width, 0, 0)
self.input.resize(1, self.width, self.height-1, 0)
diff --git a/src/windows.py b/src/windows.py
index 74d3b398..ef11107a 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -588,9 +588,7 @@ class TextWin(Win):
with g_lock:
self._win.erase()
for y, line in enumerate(lines):
- if line is None:
- self.write_line_separator()
- else:
+ if line:
msg = line.msg
if line.start_pos == 0:
if msg.nick_color:
@@ -606,8 +604,9 @@ class TextWin(Win):
self._win.attrset(0)
for y, line in enumerate(lines):
if not line:
- continue
- self.write_text(y, (3 if line.msg.nickname else 1) + len(line.msg.str_time)+len(truncate_nick(line.msg.nickname) or ''), line.msg.txt[line.start_pos:line.end_pos])
+ self.write_line_separator()
+ else:
+ self.write_text(y, (3 if line.msg.nickname else 1) + len(line.msg.str_time)+len(truncate_nick(line.msg.nickname) or ''), line.msg.txt[line.start_pos:line.end_pos])
if y != self.height-1:
self.addstr('\n')
self._win.attrset(0)