class: Tools::CodeNavigationService
authorClaus Gittinger <cg@exept.de>
Mon, 02 Sep 2013 19:51:24 +0200
changeset 13463 3b75183ce219
parent 13462 e90dca80cfc2
child 13464 931d28c589b7
class: Tools::CodeNavigationService changed: #keyPress:x:y:in:
Tools__CodeNavigationService.st
--- a/Tools__CodeNavigationService.st	Mon Sep 02 17:19:27 2013 +0200
+++ b/Tools__CodeNavigationService.st	Mon Sep 02 19:51:24 2013 +0200
@@ -322,15 +322,17 @@
     <resource: #keyboard (#Control_L #Ctrl 
                           #CursorRight #CursorDown #CursorLeft #CursorUp)>
 
-    |ev p|
+    |ev p sensor|
 
     (view == textView) ifTrue:[
+        sensor := view sensor.
+
         "/ ("ctrlDown" "key == #'Control_L' or:[ key == #Ctrl ]") ifTrue:[
         (textView isQuickMenuModifierPressed) ifTrue:[
             "/ because it is delegated, the position is not correct
             ev := WindowGroup lastEventQuerySignal query.
             p := view device translatePoint:(ev x @ ev y) fromView:ev view toView:view.
-            view sensor 
+            sensor 
                 pushUserEvent:#highlightElementAtX:y: 
                 for: self 
                 withArguments:{p x. p y.}.
@@ -343,11 +345,11 @@
 "/            ^ false
 "/        ].
 
-        view sensor metaDown ifTrue:[
+        sensor metaDown ifTrue:[
             (key == #CursorRight or:[key == #CursorDown]) ifTrue:[
-                view sensor pushUserEvent:#findNextVariableFromCursor for:self.
+                sensor pushUserEvent:#findNextVariableFromCursor for:self.
             ] ifFalse:[(key == #CursorLeft or:[key == #CursorUp]) ifTrue:[
-                view sensor pushUserEvent:#findPreviousVariableFromCursor for:self.
+                sensor pushUserEvent:#findPreviousVariableFromCursor for:self.
             ]].
         ] ifFalse:[
             (key == #CursorRight
@@ -355,9 +357,9 @@
               or:[key == #CursorLeft
               or:[key == #CursorUp]]]
             ) ifTrue:[
-                view sensor pushUserEvent:#highlightVariableAtCursor for:self .
+                sensor pushUserEvent:#highlightVariableAtCursor for:self .
             ] ifFalse:[
-                view sensor pushUserEvent:#highlightClear for:self .
+                "/ sensor pushUserEvent:#highlightClear for:self .
             ]
         ]
     ].
@@ -729,14 +731,14 @@
 !CodeNavigationService class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.33 2013-08-30 23:05:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.34 2013-09-02 17:51:24 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.33 2013-08-30 23:05:12 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.34 2013-09-02 17:51:24 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: Tools__CodeNavigationService.st,v 1.33 2013-08-30 23:05:12 cg Exp $'
+    ^ '$Id: Tools__CodeNavigationService.st,v 1.34 2013-09-02 17:51:24 cg Exp $'
 ! !