diff options
Diffstat (limited to 'pkg/gui/editors.go')
-rw-r--r-- | pkg/gui/editors.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/pkg/gui/editors.go b/pkg/gui/editors.go index b94e6b5bd..430dcfdfe 100644 --- a/pkg/gui/editors.go +++ b/pkg/gui/editors.go @@ -77,8 +77,10 @@ func (gui *Gui) defaultEditor(v *gocui.View, key gocui.Key, ch rune, mod gocui.M if gui.findSuggestions != nil { input := v.TextArea.GetContent() - suggestions := gui.findSuggestions(input) - gui.setSuggestions(suggestions) + gui.suggestionsAsyncHandler.Do(func() func() { + suggestions := gui.findSuggestions(input) + return func() { gui.setSuggestions(suggestions) } + }) } return matched |