aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/compose.go18
-rw-r--r--widgets/exline.go18
2 files changed, 30 insertions, 6 deletions
diff --git a/widgets/compose.go b/widgets/compose.go
index 6e34365a..14a75bb6 100644
--- a/widgets/compose.go
+++ b/widgets/compose.go
@@ -214,7 +214,11 @@ func (c *Composer) buildComposeHeader(aerc *Aerc, cmpl *completer.Completer) {
c.layout[i][j] = h // normalize to lowercase
e := newHeaderEditor(h, c.header, uiConfig)
if aerc.conf.Ui.CompletionPopovers {
- e.input.TabComplete(cmpl.ForHeader(h), uiConfig.CompletionDelay)
+ e.input.TabComplete(
+ cmpl.ForHeader(h),
+ uiConfig.CompletionDelay,
+ uiConfig.CompletionMinChars,
+ )
}
c.editors[h] = e
switch h {
@@ -233,7 +237,11 @@ func (c *Composer) buildComposeHeader(aerc *Aerc, cmpl *completer.Completer) {
if _, ok := c.editors[h]; !ok {
e := newHeaderEditor(h, c.header, uiConfig)
if aerc.conf.Ui.CompletionPopovers {
- e.input.TabComplete(cmpl.ForHeader(h), uiConfig.CompletionDelay)
+ e.input.TabComplete(
+ cmpl.ForHeader(h),
+ uiConfig.CompletionDelay,
+ uiConfig.CompletionMinChars,
+ )
}
c.editors[h] = e
c.focusable = append(c.focusable, e)
@@ -1005,7 +1013,11 @@ func (c *Composer) AddEditor(header string, value string, appendHeader bool) {
uiConfig := c.acct.UiConfig()
e := newHeaderEditor(header, c.header, uiConfig)
if uiConfig.CompletionPopovers {
- e.input.TabComplete(c.completer.ForHeader(header), uiConfig.CompletionDelay)
+ e.input.TabComplete(
+ c.completer.ForHeader(header),
+ uiConfig.CompletionDelay,
+ uiConfig.CompletionMinChars,
+ )
}
c.editors[header] = e
c.layout = append(c.layout, []string{header})
diff --git a/widgets/exline.go b/widgets/exline.go
index 789ccde8..5cf4338d 100644
--- a/widgets/exline.go
+++ b/widgets/exline.go
@@ -23,7 +23,11 @@ func NewExLine(conf *config.AercConfig, cmd string, commit func(cmd string), fin
) *ExLine {
input := ui.NewTextInput("", &conf.Ui).Prompt(":").Set(cmd)
if conf.Ui.CompletionPopovers {
- input.TabComplete(tabcomplete, conf.Ui.CompletionDelay)
+ input.TabComplete(
+ tabcomplete,
+ conf.Ui.CompletionDelay,
+ conf.Ui.CompletionMinChars,
+ )
}
exline := &ExLine{
commit: commit,
@@ -37,7 +41,11 @@ func NewExLine(conf *config.AercConfig, cmd string, commit func(cmd string), fin
}
func (x *ExLine) TabComplete(tabComplete func(string) ([]string, string)) {
- x.input.TabComplete(tabComplete, x.conf.Ui.CompletionDelay)
+ x.input.TabComplete(
+ tabComplete,
+ x.conf.Ui.CompletionDelay,
+ x.conf.Ui.CompletionMinChars,
+ )
}
func NewPrompt(conf *config.AercConfig, prompt string, commit func(text string),
@@ -45,7 +53,11 @@ func NewPrompt(conf *config.AercConfig, prompt string, commit func(text string),
) *ExLine {
input := ui.NewTextInput("", &conf.Ui).Prompt(prompt)
if conf.Ui.CompletionPopovers {
- input.TabComplete(tabcomplete, conf.Ui.CompletionDelay)
+ input.TabComplete(
+ tabcomplete,
+ conf.Ui.CompletionDelay,
+ conf.Ui.CompletionMinChars,
+ )
}
exline := &ExLine{
commit: commit,