File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/GToolkit-Coder-AddOns Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,21 @@ GtTextualCoder >> initializeSearchTextAddOns: addOns viewModel: aCoderViewModel
120120 | anElement |
121121 anElement := GtTextualCoderSearchTextElement new
122122 textualCoderViewModel: aCoderViewModel;
123- editorDo: [ :anEditor | anEditor requestFocus ];
123+ editorDo: [ :anEditor |
124+ anEditor requestFocus
125+ aCoderViewModel selection isEmpty ifFalse: [
126+ | text |
127+ text := (aCoderViewModel sourceText
128+ copyFrom: aCoderViewModel selection from + 1
129+ to: aCoderViewModel selection to) asString.
130+ anEditor doBlockSoon: [
131+ (anEditor inserter)
132+ atCursor;
133+ string: text;
134+ insert.
135+ (anEditor selecter)
136+ all;
137+ select ] ] ];
124138 hFitContentLimited;
125139 constraintsDo: [ :c |
126140 c minWidth: 300 .
You can’t perform that action at this time.
0 commit comments