aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2019-03-15 21:41:18 -0400
committerDrew DeVault <sir@cmpwn.com>2019-03-15 21:41:39 -0400
commite780c6ee96ae086fc668aadcd61fb1777d1cbe43 (patch)
tree53a4f8b7809563de114b0f870a89a3bb029b1268 /widgets
parentef6178a12ae5ef7070711f5cc2f2114dfd015dcd (diff)
downloadaerc-e780c6ee96ae086fc668aadcd61fb1777d1cbe43.tar.gz
Implement :next-message n%
Diffstat (limited to 'widgets')
-rw-r--r--widgets/msglist.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/widgets/msglist.go b/widgets/msglist.go
index 0fb919df..cf9a7726 100644
--- a/widgets/msglist.go
+++ b/widgets/msglist.go
@@ -13,6 +13,7 @@ import (
type MessageList struct {
conf *config.AercConfig
logger *log.Logger
+ height int
onInvalidate func(d ui.Drawable)
selected int
spinner *Spinner
@@ -45,6 +46,7 @@ func (ml *MessageList) Invalidate() {
}
func (ml *MessageList) Draw(ctx *ui.Context) {
+ ml.height = ctx.Height()
ctx.Fill(0, 0, ctx.Width(), ctx.Height(), ' ', tcell.StyleDefault)
if ml.store == nil {
@@ -91,6 +93,10 @@ func (ml *MessageList) Draw(ctx *ui.Context) {
}
}
+func (ml *MessageList) Height() int {
+ return ml.height
+}
+
func (ml *MessageList) SetStore(store *lib.MessageStore) {
ml.store = store
if store != nil {