EditTextView.st
changeset 3790 7f4d267cf342
parent 3789 a9b4805e0754
child 3793 5a6074a257c1
--- a/EditTextView.st	Tue Dec 02 12:34:12 2008 +0100
+++ b/EditTextView.st	Tue Dec 02 14:13:30 2008 +0100
@@ -4083,13 +4083,15 @@
                     newCursorCol := clickCol.
 
                     cursorType ~~ #block ifTrue:[
-                        "/ we do something special, if the text-cursor's type is not a block-cursor
-                        "/ (i.e. if its an ibeam).
-                        "/ adjust clickCol if the user clicked in the right third of a character.
-                        x1 := self xOfCol:clickCol inVisibleLine:cursorVisibleLine.
-                        x2 := self xOfCol:clickCol+1 inVisibleLine:cursorVisibleLine.
-                        x2_3 := x1 + ((x2-x1) * (2/3)).
-                        (clickPos x >= x2_3) ifTrue:[ newCursorCol := clickCol+1 ].
+                        clickPos notNil ifTrue:[
+                            "/ we do something special, if the text-cursor's type is not a block-cursor
+                            "/ (i.e. if its an ibeam).
+                            "/ adjust clickCol if the user clicked in the right third of a character.
+                            x1 := self xOfCol:clickCol inVisibleLine:clickLine.  
+                            x2 := self xOfCol:clickCol+1 inVisibleLine:clickLine.
+                            x2_3 := x1 + ((x2-x1) * (2/3)).
+                            (clickPos x >= x2_3) ifTrue:[ newCursorCol := clickCol+1 ].
+                        ].
                     ].
                     self cursorLine:clickLine col:newCursorCol.
                 ]
@@ -7343,5 +7345,5 @@
 !EditTextView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.446 2008-12-02 11:34:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg/EditTextView.st,v 1.447 2008-12-02 13:13:30 cg Exp $'
 ! !