aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorRobin Jarry <robin@jarry.cc>2024-06-10 21:22:45 +0200
committerRobin Jarry <robin@jarry.cc>2024-06-23 22:07:09 +0200
commita37ae231061e027233dc159900846f75c32a6d18 (patch)
tree5bcf1da929eb20e8d15746a05b3985c994106983 /app
parent74cea6b5191d6d34cd4282840e05aa0970120341 (diff)
downloadaerc-a37ae231061e027233dc159900846f75c32a6d18.tar.gz
binds: allow per folder sections for the message viewer
Allow creating [view:folder=FooBar] in binds.conf. Changelog-added: Per folder key bindings can now be defined for the message viewer. Requested-by: Matěj Cepl <mcepl@cepl.eu> Signed-off-by: Robin Jarry <robin@jarry.cc> Tested-by: Matěj Cepl <mcepl@cepl.eu>
Diffstat (limited to 'app')
-rw-r--r--app/aerc.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/aerc.go b/app/aerc.go
index 3f2c9b32..b6bc2430 100644
--- a/app/aerc.go
+++ b/app/aerc.go
@@ -265,14 +265,16 @@ func (aerc *Aerc) getBindings() *config.KeyBindings {
}
return binds.ForFolder(view.SelectedDirectory())
case *MessageViewer:
+ var binds *config.KeyBindings
switch view.Bindings() {
case "view::passthrough":
- return config.Binds.MessageViewPassthrough.ForAccount(
+ binds = config.Binds.MessageViewPassthrough.ForAccount(
selectedAccountName)
default:
- return config.Binds.MessageView.ForAccount(
+ binds = config.Binds.MessageView.ForAccount(
selectedAccountName)
}
+ return binds.ForFolder(view.SelectedAccount().SelectedDirectory())
case *Terminal:
return config.Binds.Terminal
default: