weechat-matrix: Fetch from the backlog if the buffer has < 10 lines at startup.

This commit is contained in:
Damir Jelić 2019-09-11 13:48:10 +02:00
parent f48a69a6b6
commit e5f6b597af
2 changed files with 9 additions and 1 deletions

View file

@ -446,6 +446,12 @@ class WeechatChannelBuffer(object):
"""Get the bar item input text of the buffer."""
return W.buffer_get_string(self._ptr, "input")
@property
def num_lines(self):
own_lines = W.hdata_pointer(self._hdata, self._ptr, "own_lines")
return W.hdata_integer(W.hdata_get("lines"), own_lines, "lines_count")
@property
def lines(self):
own_lines = W.hdata_pointer(self._hdata, self._ptr, "own_lines")