mirror of
https://github.com/rivo/tview.git
synced 2025-04-24 13:48:56 +08:00
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.
|
// Draw autocomplete list.
|
||||||
i.autocompleteListMutex.Lock()
|
i.autocompleteListMutex.Lock()
|
||||||
defer i.autocompleteListMutex.Unlock()
|
defer i.autocompleteListMutex.Unlock()
|
||||||
if i.autocompleteList != nil {
|
if i.autocompleteList != nil && i.HasFocus() {
|
||||||
// How much space do we need?
|
// How much space do we need?
|
||||||
lheight := i.autocompleteList.GetItemCount()
|
lheight := i.autocompleteList.GetItemCount()
|
||||||
lwidth := 0
|
lwidth := 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user