summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-26 08:25:32 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-26 08:25:32 +0200
commite82e709bcc525e4d9a6e6b5cf75f61e7ab20c2e5 (patch)
treefcddb1294228b2b7c4294a4c49b1b63815790f67
parent58bd71f26d2920eaa996a9615d0b762a08d438bc (diff)
Multiline Fl_Input: fix move up/down in non ASCII text
-rw-r--r--src/Fl_Input_.cxx4
1 files 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);