Fix lines displayed in wrong buffer on startup
The bug was introduced by commit 46e5dee03a
(option relay.lines to limit the number of lines received on connection).
This commit is contained in:
parent
8217c4e28a
commit
e38ef66393
1 changed files with 6 additions and 3 deletions
|
@ -359,12 +359,15 @@ class MainWindow(QTGUI.QMainWindow):
|
||||||
index = [i for i, b in enumerate(self.buffers)
|
index = [i for i, b in enumerate(self.buffers)
|
||||||
if b.pointer() == ptrbuf]
|
if b.pointer() == ptrbuf]
|
||||||
if index:
|
if index:
|
||||||
lines.append((item['date'], item['prefix'],
|
lines.append(
|
||||||
item['message']))
|
(index[0],
|
||||||
|
(item['date'], item['prefix'],
|
||||||
|
item['message']))
|
||||||
|
)
|
||||||
if message.msgid == 'listlines':
|
if message.msgid == 'listlines':
|
||||||
lines.reverse()
|
lines.reverse()
|
||||||
for line in lines:
|
for line in lines:
|
||||||
self.buffers[index[0]].widget.chat.display(*line)
|
self.buffers[line[0]].widget.chat.display(*line[1])
|
||||||
|
|
||||||
def _parse_nicklist(self, message):
|
def _parse_nicklist(self, message):
|
||||||
"""Parse a WeeChat message with a buffer nicklist."""
|
"""Parse a WeeChat message with a buffer nicklist."""
|
||||||
|
|
Loading…
Reference in a new issue