#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Thu, 27 Jun 2019 19:09:15 +0200
changeset 6618 25d16c26e044
parent 6617 129dbcededf3
child 6619 e042a2f30428
#FEATURE by cg class: TextView changed: #buttonRelease:x:y:
TextView.st
--- a/TextView.st	Wed Jun 26 23:25:20 2019 +0200
+++ b/TextView.st	Thu Jun 27 19:09:15 2019 +0200
@@ -1596,7 +1596,24 @@
 buttonRelease:button x:x y:y
     "mouse- button release - turn off autoScroll if any"
 
+    |line emphasis emphasisAction|
+    
     (button == 1) ifTrue:[
+        
+        "/ see if clicked on text an actionBlock
+        self hasSelection ifFalse:[
+            (clickStartLine notNil and:[clickStartCol notNil]) ifTrue:[
+                line := self listAt:clickStartLine.
+                line size >= clickStartCol ifTrue:[
+                    emphasis := line emphasisAt:clickStartCol.
+                    (emphasisAction := Text actionBlockFromEmphasis:emphasis) notNil ifTrue:[
+                        emphasisAction value.
+                        ^ self
+                    ].
+                ].
+            ].
+        ].
+        
         self hasSelection ifTrue:[
             self setPrimarySelection.
             self selectionChanged.
@@ -1616,7 +1633,8 @@
 
     "/ clickPos := clickLine := clickCol := nil.
 
-    "Modified: / 20.5.1999 / 17:14:23 / cg"
+    "Modified: / 20-05-1999 / 17:14:23 / cg"
+    "Modified: / 27-06-2019 / 19:06:33 / Claus Gittinger"
 !
 
 doubleClickX:x y:y