From 14fc59f189775dbe95daf582c08c9c1b3cd949b2 Mon Sep 17 00:00:00 2001 From: Vitaly Ovchinnikov Date: Fri, 29 Sep 2023 18:48:47 +0000 Subject: 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 Acked-by: Robin Jarry --- app/account.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'app/account.go') 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() } -- cgit