From 15e1ddf3c9c0ea6e24b331c848e4e40c8cb6ca35 Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Sat, 18 Dec 2010 08:32:37 +0000 Subject: Fix STR #2486: cursor position was wrong in some tab-containing wrapped lines. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8052 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Input_.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Fl_Input_.cxx') 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, -- cgit v1.2.3