mirror of https://github.com/rivo/tview.git
Autocomplete list should not be drawn when input field does not have focus. Fixes #1048
This commit is contained in:
parent
8aacdccd82
commit
8708192e56
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue