Merge pull request #143 from keywan-ghadami/prefill-searchpanel-textbox

WIP: prefill the search panael text box with selected text from the editor
This commit is contained in:
Vadim Lopatin 2016-03-09 09:09:44 +03:00
commit 41b7e96172
2 changed files with 6 additions and 0 deletions

View File

@ -986,6 +986,8 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
_logPanel.getTabs.selectTab("search");
if(searchPanel !is null) {
searchPanel.focus();
dstring selectedText = currentEditor.getSelectedText();
searchPanel.setSearchText(selectedText);
}
return true;
case IDEActions.FileNewWorkspace:

View File

@ -170,6 +170,10 @@ class SearchWidget : TabWidget {
}
return true;
}
public void setSearchText(dstring txt){
_findText.text = txt;
}
protected bool onEditorAction(const Action action) {
if (action.id == EditorActions.InsertNewLine) {