From c841f36513ffdaffbf4b68e5f108c97a45745092 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Mon, 18 Jul 2022 12:54:55 +0200 Subject: tabs: rename SelectedTab to SelectedTabContent This function returns an ui.Drawable. Use a more explicit name. This prepares for adding a new SelectedTab function which will return an ui.Tab. Signed-off-by: Robin Jarry Acked-by: Koni Marti --- aerc.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'aerc.go') diff --git a/aerc.go b/aerc.go index 6144e53..d43ed93 100644 --- a/aerc.go +++ b/aerc.go @@ -59,7 +59,7 @@ func getCommands(selected libui.Drawable) []*commands.Commands { } func execCommand(aerc *widgets.Aerc, ui *libui.UI, cmd []string) error { - cmds := getCommands(aerc.SelectedTab()) + cmds := getCommands(aerc.SelectedTabContent()) for i, set := range cmds { err := set.ExecuteCommand(aerc, cmd) if _, ok := err.(commands.NoSuchCommand); ok { @@ -81,7 +81,7 @@ func execCommand(aerc *widgets.Aerc, ui *libui.UI, cmd []string) error { func getCompletions(aerc *widgets.Aerc, cmd string) []string { var completions []string - for _, set := range getCommands(aerc.SelectedTab()) { + for _, set := range getCommands(aerc.SelectedTabContent()) { completions = append(completions, set.GetCompletions(aerc, cmd)...) } sort.Strings(completions) -- cgit v1.2.3