IDEA-147128 "Search Everywhere" dialog contains highlighted text from code editor

This commit is contained in:
Konstantin Bulenkov
2016-04-21 23:33:59 +02:00
parent fcc3e0e16a
commit 8b1917c9e8
@@ -388,10 +388,10 @@ 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());