aboutsummaryrefslogtreecommitdiffstats
path: root/commands/msg
diff options
context:
space:
mode:
authorTim Culverhouse <tim@timculverhouse.com>2022-03-21 18:23:47 -0500
committerRobin Jarry <robin@jarry.cc>2022-03-22 09:50:32 +0100
commite56648029f2231a58ed4afbbe804b845e02fde62 (patch)
treea59f4fe6308de6d9e7241ac5e0a6cb8d909d70b3 /commands/msg
parent93c160ab66c0ecf6854dfc13ef3ebba26c3aefe8 (diff)
downloadaerc-e56648029f2231a58ed4afbbe804b845e02fde62.tar.gz
compose: make headerEditor focusing more reliable
Focusing header editors was hardcoded as integers which only worked with the default ui. If a user changed the UI to, for example, put CC as a field below "to", FocusSubject would focus the CC field instead of the subject. This commit reuses and modifies the function FocusEditor to generalize the focusing of header editors - which can now be called by name via FocusEditor(name string) Signed-off-by: Tim Culverhouse <tim@timculverhouse.com> Acked-by: Robin Jarry <robin@jarry.cc>
Diffstat (limited to 'commands/msg')
-rw-r--r--commands/msg/forward.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/commands/msg/forward.go b/commands/msg/forward.go
index 9cc13c00..c8e04f17 100644
--- a/commands/msg/forward.go
+++ b/commands/msg/forward.go
@@ -94,7 +94,7 @@ func (forward) Execute(aerc *widgets.Aerc, args []string) error {
tab := aerc.NewTab(composer, subject)
if !h.Has("to") {
- composer.FocusRecipient()
+ composer.FocusEditor("to")
} else {
composer.FocusTerminal()
}