summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Input_.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Fl_Input_.cxx b/src/Fl_Input_.cxx
index 03f8a974b..a0438356c 100644
--- a/src/Fl_Input_.cxx
+++ b/src/Fl_Input_.cxx
@@ -358,6 +358,8 @@ void Fl_Input_::drawtext(int X, int Y, int W, int H) {
if (Fl::focus() == this && selstart == selend &&
position() >= p-value() && position() <= e-value()) {
fl_color(cursor_color());
+ // cursor position may need to be recomputed (see STR #2486)
+ curx = int(expandpos(p, value()+position(), buf, 0)+.5);
if (readonly()) {
fl_line((int)(xpos+curx-2.5f), Y+ypos+height-1,
(int)(xpos+curx+0.5f), Y+ypos+height-4,