When the composer window opens, an user might want to start writing
the email body before adding a subject and recipients. Setting the
focus-body option to true achieves that by setting the focus to the
editor.
Signed-off-by: Markus Unkel <markus@unkel.io>
---
This simplifies v3 by removing the focusBody field from composer.
Acked-by: Robin Jarry <robin@jarry.cc>
Applied. Thanks for your patience, Markus!
To git@git.sr.ht:~rjarry/aerc
7f28ba10d5e9..1a3b2b24eb51 master -> master
app/compose.go | 2 +-config/aerc.conf | 6 ++++++config/compose.go | 1 +doc/aerc-config.5.scd | 5 +++++
4 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/app/compose.go b/app/compose.go
index 7a581505..2cd7fd61 100644
--- a/app/compose.go+++ b/app/compose.go
@@ -1276,7 +1276,7 @@ func (c *Composer) showTerminal() error {
c.focusable = append(c.focusable, c.editor)
c.review = nil
c.updateGrid()
- if c.editHeaders {+ if c.editHeaders || config.Compose.FocusBody { c.focusTerminalPriv()
}
return nil
diff --git a/config/aerc.conf b/config/aerc.conf
index 4a83625a..9070bcf3 100644
--- a/config/aerc.conf+++ b/config/aerc.conf
@@ -654,6 +654,12 @@
# Default: false
#edit-headers=false
+#+# Sets focus to the email body when the composer window opens.+#+# Default: false+#focus-body=false+#
# Specifies the command to be used to tab-complete email addresses. Any
# occurrence of "%s" in the address-book-cmd will be replaced with what the
diff --git a/config/compose.go b/config/compose.go
index d6f25d31..db963f56 100644
--- a/config/compose.go+++ b/config/compose.go
@@ -17,6 +17,7 @@ type ComposeConfig struct {
FilePickerCmd string `ini:"file-picker-cmd"`
FormatFlowed bool `ini:"format-flowed"`
EditHeaders bool `ini:"edit-headers"`
+ FocusBody bool `ini:"focus-body"` LFEditor bool `ini:"lf-editor"`
}
diff --git a/doc/aerc-config.5.scd b/doc/aerc-config.5.scd
index 80922fa1..56c4e209 100644
--- a/doc/aerc-config.5.scd+++ b/doc/aerc-config.5.scd
@@ -883,6 +883,11 @@ These options are configured in the *[compose]* section of _aerc.conf_.
Default: _false_
+*focus-body* = _true_|_false_+ Sets focus to the email body when the composer window opens.++ Default: _false_+*address-book-cmd* = _<command>_
Specifies the command to be used to tab-complete email addresses. Any
occurrence of _%s_ in the *address-book-cmd* will be replaced with anything
--
2.47.0