From 8708192e562a88fa11610c174915d12740d97fe8 Mon Sep 17 00:00:00 2001 From: Oliver <480930+rivo@users.noreply.github.com> Date: Sun, 3 Nov 2024 18:11:17 +0100 Subject: [PATCH] Autocomplete list should not be drawn when input field does not have focus. Fixes #1048 --- inputfield.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputfield.go b/inputfield.go index 3511278..7fcb329 100644 --- a/inputfield.go +++ b/inputfield.go @@ -493,7 +493,7 @@ func (i *InputField) Draw(screen tcell.Screen) { // Draw autocomplete list. i.autocompleteListMutex.Lock() defer i.autocompleteListMutex.Unlock() - if i.autocompleteList != nil { + if i.autocompleteList != nil && i.HasFocus() { // How much space do we need? lheight := i.autocompleteList.GetItemCount() lwidth := 0