Autoinserted value in Search Everywhere should be selected (IDEA-146791)

Search Everywhere is not automatically displaying selected text (IDEA-157100)
This commit is contained in:
Maxim.Mossienko
2016-11-23 13:06:12 +01:00
parent 680b755c89
commit e390bd0c32
@@ -373,13 +373,14 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA
return;
}
String text = "";
//if (myEditor != null) {
// text = myEditor.getSelectionModel().getSelectedText();
// text = text == null ? "" : text.trim();
//}
if (myEditor != null) {
text = myEditor.getSelectionModel().getSelectedText();
text = text == null ? "" : text.trim();
}
search.setText(text);
search.getTextEditor().setForeground(UIUtil.getLabelForeground());
search.selectText();
//titleIndex = new TitleIndexes();
editor.setColumns(SEARCH_FIELD_COLUMNS);
myFocusComponent = e.getOppositeComponent();