Autocomplete list should not be drawn when input field does not have focus. Fixes #1048

This commit is contained in:
Oliver 2024-11-03 18:11:17 +01:00
parent 8aacdccd82
commit 8708192e56
1 changed files with 1 additions and 1 deletions

View File

@ -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