diff options
author | Ben Burwell <ben@benburwell.com> | 2019-12-20 13:21:33 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-12-21 09:23:21 -0500 |
commit | 7160f98a9081bcab05904484eae790ec0a006b87 (patch) | |
tree | e35712afd3dcec12efd47a89d8e4f652fab9cca1 /config/config.go | |
parent | bcd03c4c4a94e73b2545bf5dfc404082a674c76e (diff) | |
download | aerc-7160f98a9081bcab05904484eae790ec0a006b87.tar.gz |
Show textinput completions in popovers
Rather than showing completions inline in the text input, show them in a
popover which can be scrolled by repeatedly pressing the tab key. The
selected completion can be executed by pressing enter.
Diffstat (limited to 'config/config.go')
-rw-r--r-- | config/config.go | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/config/config.go b/config/config.go index dd1f5f47..d6afef66 100644 --- a/config/config.go +++ b/config/config.go @@ -11,6 +11,7 @@ import ( "regexp" "sort" "strings" + "time" "unicode" "github.com/gdamore/tcell" @@ -25,21 +26,23 @@ type GeneralConfig struct { } type UIConfig struct { - IndexFormat string `ini:"index-format"` - TimestampFormat string `ini:"timestamp-format"` - ShowHeaders []string `delim:","` - RenderAccountTabs string `ini:"render-account-tabs"` - SidebarWidth int `ini:"sidebar-width"` - PreviewHeight int `ini:"preview-height"` - EmptyMessage string `ini:"empty-message"` - EmptyDirlist string `ini:"empty-dirlist"` - MouseEnabled bool `ini:"mouse-enabled"` - NewMessageBell bool `ini:"new-message-bell"` - Spinner string `ini:"spinner"` - SpinnerDelimiter string `ini:"spinner-delimiter"` - DirListFormat string `ini:"dirlist-format"` - Sort []string `delim:" "` - NextMessageOnDelete bool `ini:"next-message-on-delete"` + IndexFormat string `ini:"index-format"` + TimestampFormat string `ini:"timestamp-format"` + ShowHeaders []string `delim:","` + RenderAccountTabs string `ini:"render-account-tabs"` + SidebarWidth int `ini:"sidebar-width"` + PreviewHeight int `ini:"preview-height"` + EmptyMessage string `ini:"empty-message"` + EmptyDirlist string `ini:"empty-dirlist"` + MouseEnabled bool `ini:"mouse-enabled"` + NewMessageBell bool `ini:"new-message-bell"` + Spinner string `ini:"spinner"` + SpinnerDelimiter string `ini:"spinner-delimiter"` + DirListFormat string `ini:"dirlist-format"` + Sort []string `delim:" "` + NextMessageOnDelete bool `ini:"next-message-on-delete"` + CompletionDelay time.Duration `ini:"completion-delay"` + CompletionPopovers bool `ini:"completion-popovers"` } const ( @@ -387,6 +390,8 @@ func LoadConfigFromFile(root *string, sharedir string) (*AercConfig, error) { SpinnerDelimiter: ",", DirListFormat: "%n %>r", NextMessageOnDelete: true, + CompletionDelay: 250 * time.Millisecond, + CompletionPopovers: true, }, Viewer: ViewerConfig{ |