diff options
author | Robin Jarry <robin@jarry.cc> | 2023-08-12 00:51:41 +0200 |
---|---|---|
committer | Robin Jarry <robin@jarry.cc> | 2023-11-02 16:30:47 +0100 |
commit | 44a55d41ad6b5c61c75456414e13aec94b367b02 (patch) | |
tree | 8c82e4a02cda4210d39af99d63865e260f01992d /app/exline.go | |
parent | c4e6de9d59cc534171fd0ef9fa51995e70a8b32e (diff) | |
download | aerc-44a55d41ad6b5c61c75456414e13aec94b367b02.tar.gz |
complete: allow setting the completion key binding
Until now, if less than complete-min-chars were entered or if
completion-delay had not expired yet, the only way to force trigger
completion was to press <tab>.
In some cases, <tab> is already bound to another action (for example
:next-field in the compose::editor context). This makes forcing the
completion impossible.
Allow defining a key to trigger manual completion via the new $complete
special entry in binds.conf.
Leave the default binding to <tab>. Set it to <C-o> in the
[compose::editor] to avoid conflicting with the existing <tab> binding.
Changelog-added: Customize key to trigger completion with `$complete` in
`binds.conf`.
Signed-off-by: Robin Jarry <robin@jarry.cc>
Reviewed-by: Tim Culverhouse <tim@timculverhouse.com>
Diffstat (limited to 'app/exline.go')
-rw-r--r-- | app/exline.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/exline.go b/app/exline.go index b941b100..61fc340a 100644 --- a/app/exline.go +++ b/app/exline.go @@ -26,6 +26,7 @@ func NewExLine(cmd string, commit func(cmd string), finish func(), tabcomplete, config.Ui.CompletionDelay, config.Ui.CompletionMinChars, + &config.Binds.Global.CompleteKey, ) } exline := &ExLine{ @@ -43,6 +44,7 @@ func (x *ExLine) TabComplete(tabComplete func(string) ([]string, string)) { tabComplete, config.Ui.CompletionDelay, config.Ui.CompletionMinChars, + &config.Binds.Global.CompleteKey, ) } @@ -55,6 +57,7 @@ func NewPrompt(prompt string, commit func(text string), tabcomplete, config.Ui.CompletionDelay, config.Ui.CompletionMinChars, + &config.Binds.Global.CompleteKey, ) } exline := &ExLine{ |