Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion src/GToolkit-Coder-AddOns/GtTextualCoder.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,21 @@ GtTextualCoder >> initializeSearchTextAddOns: addOns viewModel: aCoderViewModel
| anElement |
anElement := GtTextualCoderSearchTextElement new
textualCoderViewModel: aCoderViewModel;
editorDo: [ :anEditor | anEditor requestFocus ];
editorDo: [ :anEditor |
anEditor requestFocus.
aCoderViewModel selection isEmpty ifFalse: [
| text |
text := (aCoderViewModel sourceText
copyFrom: aCoderViewModel selection from + 1
to: aCoderViewModel selection to) asString.
anEditor doBlockSoon: [
(anEditor inserter)
atCursor;
string: text;
insert.
(anEditor selecter)
all;
select ] ] ];
hFitContentLimited;
constraintsDo: [ :c |
c minWidth: 300.
Expand Down