From 17efc9b092f0b05b2c6b1b1a1ba833c2d53655ed Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Mon, 2 Jan 2006 23:25:08 +0000 Subject: PositionFromPointClose returns position after last character on line when given position in the last half of the last character on line. --- src/Editor.cxx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Editor.cxx b/src/Editor.cxx index 4ec9be190..dfeb1a62d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -810,6 +810,9 @@ int Editor::PositionFromLocationClose(Point pt) { return pdoc->MovePositionOutsideChar(i + posLineStart, 1); } } + if (pt.x < (ll->positions[lineEnd] - subLineStart)) { + return pdoc->MovePositionOutsideChar(lineEnd + posLineStart, 1); + } } } -- cgit v1.2.3