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.
This commit is contained in:
parent
bcd03c4c4a
commit
7160f98a90
6 changed files with 277 additions and 71 deletions
widgets
|
@ -372,7 +372,7 @@ func (aerc *Aerc) focus(item ui.Interactive) {
|
|||
|
||||
func (aerc *Aerc) BeginExCommand(cmd string) {
|
||||
previous := aerc.focused
|
||||
exline := NewExLine(cmd, func(cmd string) {
|
||||
exline := NewExLine(aerc.conf, cmd, func(cmd string) {
|
||||
parts, err := shlex.Split(cmd)
|
||||
if err != nil {
|
||||
aerc.PushStatus(" "+err.Error(), 10*time.Second).
|
||||
|
@ -399,7 +399,7 @@ func (aerc *Aerc) BeginExCommand(cmd string) {
|
|||
}
|
||||
|
||||
func (aerc *Aerc) RegisterPrompt(prompt string, cmd []string) {
|
||||
p := NewPrompt(prompt, func(text string) {
|
||||
p := NewPrompt(aerc.conf, prompt, func(text string) {
|
||||
if text != "" {
|
||||
cmd = append(cmd, text)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue