diff --git a/CHANGELOG b/CHANGELOG index a7c6674..936fd97 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,7 @@ v1.5.6 (WIP) - Add DropDown.SetDropDownOpenSymbolRune - Fix TextView always visible scroll bar not appearing when empty - Fix passing mouse events to Grid items (events are now only passed to the item under the mouse) +- Fix drawing InputField cursor outside of the field - Draw additional accents when rendering a list divider - Update Application.Draw and Application.QueueUpdateDraw to accept one or more primitives to draw instead of the whole screen diff --git a/inputfield.go b/inputfield.go index ccf35a7..de82c9f 100644 --- a/inputfield.go +++ b/inputfield.go @@ -613,7 +613,7 @@ func (i *InputField) Draw(screen tcell.Screen) { text = bytes.Repeat([]byte(string(i.maskCharacter)), utf8.RuneCount(i.text)) } var drawnText []byte - if fieldWidth >= runewidth.StringWidth(string(text)) { + if fieldWidth > runewidth.StringWidth(string(text)) { // We have enough space for the full text. drawnText = EscapeBytes(text) Print(screen, drawnText, x, y, fieldWidth, AlignLeft, fieldTextColor)