From e82e709bcc525e4d9a6e6b5cf75f61e7ab20c2e5 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Wed, 26 Apr 2023 08:25:32 +0200 Subject: [PATCH] Multiline Fl_Input: fix move up/down in non ASCII text --- src/Fl_Input_.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx index eb8f38bfb..e7cb7bbfb 100644 --- a/src/Fl_Input_.cxx +++ b/src/Fl_Input_.cxx @@ -221,10 +221,10 @@ double Fl_Input_::expandpos( chr += 7-(chr%8); } else n += 2; } else { - n++; + n += fl_utf8len1(*p); } chr += fl_utf8len((char)p[0]) >= 1; - p++; + p += fl_utf8len1(*p); } if (returnn) *returnn = n; return fl_width(buf, n);