From 53a6ae33758e7baab0cbae8b6c66c8e806f1a2f6 Mon Sep 17 00:00:00 2001 From: aditya-K2 Date: Fri, 7 Apr 2023 04:40:02 +0530 Subject: [PATCH] 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. --- inputfield.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inputfield.go b/inputfield.go index 7b4c5cb..b417d2a 100644 --- a/inputfield.go +++ b/inputfield.go @@ -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++ {