mirror of https://github.com/buggins/dlangide.git
goToDefinition by Ctrl+Click - close #111
This commit is contained in:
parent
c05067002c
commit
66c7e28639
2
dub.json
2
dub.json
|
@ -12,7 +12,7 @@
|
||||||
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
||||||
|
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"dlangui": "~>0.7.50",
|
"dlangui": "~>0.7.51",
|
||||||
"dcd": "~>0.7.5"
|
"dcd": "~>0.7.5"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -53,7 +53,7 @@ class DEditorTool : EditorTool
|
||||||
}
|
}
|
||||||
auto target = to!int(output.offset);
|
auto target = to!int(output.offset);
|
||||||
auto destPos = byteOffsetToCaret(content, target);
|
auto destPos = byteOffsetToCaret(content, target);
|
||||||
_frame.currentEditor.setCaretPos(destPos.line,destPos.pos);
|
_frame.currentEditor.setCaretPos(destPos.line,destPos.pos, true, true);
|
||||||
_frame.currentEditor.setFocus();
|
_frame.currentEditor.setFocus();
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -224,6 +224,12 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
|
||||||
return super.handleAction(a);
|
return super.handleAction(a);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Handle Ctrl + Left mouse click on text
|
||||||
|
override protected void onControlClick() {
|
||||||
|
window.dispatchAction(ACTION_GO_TO_DEFINITION);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// left button click on icons panel: toggle breakpoint
|
/// left button click on icons panel: toggle breakpoint
|
||||||
override protected bool handleLeftPaneIconsMouseClick(MouseEvent event, Rect rc, int line) {
|
override protected bool handleLeftPaneIconsMouseClick(MouseEvent event, Rect rc, int line) {
|
||||||
if (event.button == MouseButton.Left) {
|
if (event.button == MouseButton.Left) {
|
||||||
|
|
Loading…
Reference in New Issue