From 6b0b5596dee5dda9fb367cbf8c82e52b9e6125a3 Mon Sep 17 00:00:00 2001 From: Robin Jarry Date: Tue, 1 Nov 2022 12:37:16 +0100 Subject: auto-completion: add option to require a min number of chars When doing address completion via commands that take a while to run, having the completion trigger even with a single character can be non-optimal. Add an option to allow requiring a minimum number of characters to actually run the completion command. Signed-off-by: Robin Jarry Tested-by: Tim Culverhouse --- config/config.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'config/config.go') diff --git a/config/config.go b/config/config.go index a15e1d51..5e5b49bc 100644 --- a/config/config.go +++ b/config/config.go @@ -71,6 +71,7 @@ type UIConfig struct { Sort []string `delim:" "` NextMessageOnDelete bool `ini:"next-message-on-delete"` CompletionDelay time.Duration `ini:"completion-delay"` + CompletionMinChars int `ini:"completion-min-chars"` CompletionPopovers bool `ini:"completion-popovers"` StyleSetDirs []string `ini:"stylesets-dirs" delim:":"` StyleSetName string `ini:"styleset-name"` @@ -811,6 +812,7 @@ func LoadConfigFromFile(root *string, accts []string) (*AercConfig, error) { DirListDelay: 200 * time.Millisecond, NextMessageOnDelete: true, CompletionDelay: 250 * time.Millisecond, + CompletionMinChars: 1, CompletionPopovers: true, StyleSetDirs: []string{}, StyleSetName: "default", -- cgit