From 7bf15a2234a3d375a843af56fecfde28c7a8f1b8 Mon Sep 17 00:00:00 2001 From: chichian <7537479+chichian@users.noreply.github.com> Date: Wed, 3 Apr 2019 23:09:12 -0700 Subject: [PATCH] Textfield fix Fix Textfield cutting off last character. --- src/TSTextField.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TSTextField.cpp b/src/TSTextField.cpp index a3a51cb..85296d4 100644 --- a/src/TSTextField.cpp +++ b/src/TSTextField.cpp @@ -80,7 +80,7 @@ void TSTextField::draw(NVGcontext *vg) { displayStr = text; if (nextX > maxTextWidth) { - int nChars = maxTextWidth / estLetterSize; + int nChars = maxTextWidth / estLetterSize - 1; if (nChars < 1) nChars = 1;