class: ListView
authorClaus Gittinger <cg@exept.de>
Mon, 09 Sep 2013 13:19:41 +0200
changeset 4759 c89c752d03f8
parent 4758 734f7f03e95c
child 4760 7db77327da45
class: ListView changed: #characterPositionOfLine:col:
ListView.st
--- a/ListView.st	Mon Sep 09 12:50:53 2013 +0200
+++ b/ListView.st	Mon Sep 09 13:19:41 2013 +0200
@@ -3360,8 +3360,10 @@
         charPos := charPos + lineEndCharSize   "the return-character"
     ].
 
-    "/ if beyond end of line, do not advance into next line, but simulate spaces being there
-    col := colArg min:(self at:lineNr) size.
+    "/ if beyond end of line, be careful to not advance into next line.
+    "/ otherwise, syntaxHighlighter (and others) walk into trouble,
+    "/ if clicked on a space beyond a line's end.
+    col := colArg min:((self at:lineNr) size + 1).
     ^ charPos + col - 1
 
     "Modified: / 04-07-2006 / 19:14:25 / fm"
@@ -5256,10 +5258,10 @@
 !ListView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.383 2013-09-09 08:53:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.384 2013-09-09 11:19:41 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.383 2013-09-09 08:53:52 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/ListView.st,v 1.384 2013-09-09 11:19:41 cg Exp $'
 ! !