2
0
mirror of https://github.com/rivo/tview.git synced 2024-11-15 06:12:46 +00:00

use fieldWidth instead of i.fieldWidth

using i.fieldWidth doesn't work when the fieldWidth is set to 0 or the
inputField is used in FlexBox.
This commit is contained in:
aditya-K2 2023-04-07 04:40:02 +05:30
parent 1ada6e5074
commit 53a6ae3375

View File

@ -554,7 +554,7 @@ func (i *InputField) Draw(screen tcell.Screen) {
if i.autocompleteList != nil {
// How much space do we need?
lheight := i.autocompleteList.GetItemCount()
lwidth := i.fieldWidth
lwidth := fieldWidth
if !i.autocompleteMatchFieldWidth {
lwidth = 0
for index := 0; index < lheight; index++ {