diff options
author | Vitaly Ovchinnikov <v@postbox.nz> | 2023-09-29 18:48:47 +0000 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-10-22 14:56:27 +0200 |
commit | 14fc59f189775dbe95daf582c08c9c1b3cd949b2 (patch) | |
tree | 285a1b8bb0d4a27a0d04ebd09287d0cabd9654ce /app/account.go | |
parent | 6bbb477d441b17756f89e0034c26c4c3cdc941af (diff) | |
download | aerc-14fc59f189775dbe95daf582c08c9c1b3cd949b2.tar.gz |
terminal: add `:send-keys` command
Add a new command for sending keystrokes to the active terminal, if
there is one visible. Covers split preview, message viewer, composer and
the terminal mode.
This can be used to navigate the embedded applications to scroll or
safely quit them when needed.
Signed-off-by: Vitaly Ovchinnikov <v@postbox.nz>
Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'app/account.go')
-rw-r--r-- | app/account.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/account.go b/app/account.go index 312ba89b..817b9b74 100644 --- a/app/account.go +++ b/app/account.go @@ -220,6 +220,14 @@ func (acct *AccountView) SelectedMessagePart() *PartInfo { return nil } +func (acct *AccountView) Terminal() *Terminal { + if acct.split == nil { + return nil + } + + return acct.split.Terminal() +} + func (acct *AccountView) isSelected() bool { return acct == SelectedAccount() } |