--- 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