about summary refs log tree commit diff stats
path: root/widgets/exline.go
diff options
context:
space:
mode:
authorParasrah <dev@parasrah.com>2022-01-06 21:54:28 -0700
committerRobin Jarry <robin@jarry.cc>2022-01-07 13:54:10 +0100
commit71eda7d37c8ef38502c360b518fcbf5960497eea (patch)
tree07b9383865f65934001378f170c942242bc0f054 /widgets/exline.go
parentb19b844a6326793f078b4a03eaf63ca96528796e (diff)
downloadaerc-master.tar.gz
completions: add support for completing multiple addresses HEAD master
as per the discussion https://lists.sr.ht/~sircmpwn/aerc/patches/15367
this handles completions in `completer/completer.go` by enabling the
completer to return a `prefix` that will be prepended to the selected
completion candidate.
Diffstat (limited to 'widgets/exline.go')
-rw-r--r--widgets/exline.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/widgets/exline.go b/widgets/exline.go
index dd9c928..0d245fb 100644
--- a/widgets/exline.go
+++ b/widgets/exline.go
@@ -12,14 +12,14 @@ type ExLine struct {
 	ui.Invalidatable
 	commit      func(cmd string)
 	finish      func()
-	tabcomplete func(cmd string) []string
+	tabcomplete func(cmd string) ([]string, string)
 	cmdHistory  lib.History
 	input       *ui.TextInput
 	conf        *config.AercConfig
 }
 
 func NewExLine(conf *config.AercConfig, cmd string, commit func(cmd string), finish func(),
-	tabcomplete func(cmd string) []string,
+	tabcomplete func(cmd string) ([]string, string),
 	cmdHistory lib.History) *ExLine {
 
 	input := ui.NewTextInput("", conf.Ui).Prompt(":").Set(cmd)
@@ -41,7 +41,7 @@ func NewExLine(conf *config.AercConfig, cmd string, commit func(cmd string), fin
 }
 
 func NewPrompt(conf *config.AercConfig, prompt string, commit func(text string),
-	tabcomplete func(cmd string) []string) *ExLine {
+	tabcomplete func(cmd string) ([]string, string)) *ExLine {
 
 	input := ui.NewTextInput("", conf.Ui).Prompt(prompt)
 	if conf.Ui.CompletionPopovers {