#BUGFIX by exept
authorClaus Gittinger <cg@exept.de>
Sat, 09 Nov 2019 09:30:25 +0100
changeset 6736 f61a47790174
parent 6735 2d496aeaf2e1
child 6737 8e1ef494e29b
#BUGFIX by exept class: Workspace changed: #browseReferencesTo
Workspace.st
--- a/Workspace.st	Sat Nov 09 09:22:41 2019 +0100
+++ b/Workspace.st	Sat Nov 09 09:30:25 2019 +0100
@@ -1986,9 +1986,18 @@
     "ask for a name and 
      open a browser on all references to the selected global, poolvar or namespace class"
 
-    |nameOfVariable|
-
-    nameOfVariable := Dialog request:'Browse references to:'.
+    |nameOfVariable w|
+
+    (cursorLine notNil and:[cursorCol notNil]) ifTrue:[
+        self wordAtLine:cursorLine col:cursorCol do:[
+            :beginLine :beginCol :endLine :endCol :style |
+
+            w := self textFromLine:beginLine col:beginCol toLine:endLine col:endCol.
+            w := w asString string withoutSeparators.
+        ].
+    ].
+
+    nameOfVariable := Dialog request:'Browse references to:' initialAnswer:w.
     nameOfVariable isEmptyOrNil ifTrue:[^ self].
 
     self browseReferencesTo:nameOfVariable