aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/aerc.go
diff options
context:
space:
mode:
authorJeffas <dev@jeffas.io>2019-07-16 18:43:08 +0100
committerDrew DeVault <sir@cmpwn.com>2019-07-17 17:12:52 -0400
commitd7975132b62942530da6c4907bed3eb3ab99e4a3 (patch)
tree605a2e0f1dfdf20ddbb6797524d3ea7ef3d90814 /widgets/aerc.go
parenta1763bf2079400693515772dcb2ad09c53f36e4e (diff)
downloadaerc-d7975132b62942530da6c4907bed3eb3ab99e4a3.tar.gz
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.
Diffstat (limited to 'widgets/aerc.go')
-rw-r--r--widgets/aerc.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/widgets/aerc.go b/widgets/aerc.go
index e1138304..a73caecc 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)