mirror of https://github.com/buggins/dlangide.git
prefill the search panael text box with the selected text from the current editor
usecase: if DCD does not work or is not responsible i like to be able to select some text and then search for other occurrences. If the ide automaticlly prefill the textbox for the search it much more comfortable. It is standard behaivor in many (maybe every) popular applications (firefox, openoffice ...)
This commit is contained in:
parent
a53361df26
commit
45159cb301
|
@ -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:
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue