提交 1b3e7427 编写于 作者: B Benjamin Pasero

improved goto declaration behaviour when selecting

上级 d0c2b891
......@@ -236,7 +236,7 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
this.toUnhook.push(this.editor.onKeyDown((e: IKeyboardEvent) => this.onEditorKeyDown(e)));
this.toUnhook.push(this.editor.onKeyUp((e: IKeyboardEvent) => this.onEditorKeyUp(e)));
this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.resetHandler())); // https://github.com/Microsoft/vscode/issues/7827
this.toUnhook.push(this.editor.onDidChangeCursorSelection((e) => this.onDidChangeCursorSelection(e)));
this.toUnhook.push(this.editor.onDidChangeModel((e) => this.resetHandler()));
this.toUnhook.push(this.editor.onDidChangeModelContent(() => this.resetHandler()));
this.toUnhook.push(this.editor.onDidScrollChange((e) => {
......@@ -246,6 +246,12 @@ class GotoDefinitionWithMouseEditorContribution implements editorCommon.IEditorC
}));
}
private onDidChangeCursorSelection(e: editorCommon.ICursorSelectionChangedEvent): void {
if (e.selection && e.selection.startColumn !== e.selection.endColumn) {
this.resetHandler(); // immediately stop this feature if the user starts to select (https://github.com/Microsoft/vscode/issues/7827)
}
}
private onEditorMouseMove(mouseEvent: IEditorMouseEvent, withKey?: IKeyboardEvent): void {
this.lastMouseMoveEvent = mouseEvent;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册