From d7975132b62942530da6c4907bed3eb3ab99e4a3 Mon Sep 17 00:00:00 2001 From: Jeffas Date: Tue, 16 Jul 2019 18:43:08 +0100 Subject: Show currently pressed keys in statusline This patch adds the currently pressed keys to the statusline. This is useful when keybindings are multiple keys long and you might forget which keys are already pressed. --- widgets/aerc.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'widgets/aerc.go') diff --git a/widgets/aerc.go b/widgets/aerc.go index e113830..a73caec 100644 --- a/widgets/aerc.go +++ b/widgets/aerc.go @@ -58,6 +58,8 @@ func NewAerc(conf *config.AercConfig, logger *log.Logger, tabs: tabs, } + statusline.SetAerc(aerc) + for i, acct := range conf.Accounts { view := NewAccountView(conf, &conf.Accounts[i], logger, aerc) aerc.accounts[acct.Name] = view @@ -150,6 +152,7 @@ func (aerc *Aerc) Event(event tcell.Event) bool { Key: event.Key(), Rune: event.Rune(), }) + aerc.statusline.Invalidate() bindings := aerc.getBindings() incomplete := false result, strokes := bindings.GetBinding(aerc.pendingKeys) -- cgit v1.2.3