non white space offset it is

This commit is contained in:
Manindra Moharana
2014-06-09 21:02:04 +05:30
parent 28c01ff3fc
commit 875e976eec
2 changed files with 5 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ public class TextAreaPainter extends processing.app.syntax.TextAreaPainter {
else {
int x = ta.xToOffset(line, evt.getX()), x2 = x + 1, x1 = x - 1;
log("x="+x);
int xLS = off - ta.getLineStartOffset(line);
int xLS = off - ta.getLineStartNonWhiteSpaceOffset(line);
if (x < 0 || x >= s.length())
return;
String word = s.charAt(x) + "";