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/compose.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/compose.go')
-rw-r--r-- | app/compose.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/compose.go b/app/compose.go index 546184d8..76f28881 100644 --- a/app/compose.go +++ b/app/compose.go @@ -769,6 +769,10 @@ func (c *Composer) OnClose(fn func(composer *Composer)) { c.onClose = append(c.onClose, fn) } +func (c *Composer) Terminal() *Terminal { + return c.editor +} + func (c *Composer) Draw(ctx *ui.Context) { c.setTitle() c.width = ctx.Width() |