mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Scroll query editor when clicking batch links (#2644)
This commit is contained in:
@@ -29,6 +29,7 @@ import { isArray, isUndefinedOrNull } from 'vs/base/common/types';
|
|||||||
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
|
||||||
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
|
||||||
import { IEditor } from 'vs/editor/common/editorCommon';
|
import { IEditor } from 'vs/editor/common/editorCommon';
|
||||||
|
import { QueryInput } from 'sql/parts/query/common/queryInput';
|
||||||
|
|
||||||
export interface IResultMessageIntern extends IResultMessage {
|
export interface IResultMessageIntern extends IResultMessage {
|
||||||
id?: string;
|
id?: string;
|
||||||
@@ -302,14 +303,8 @@ export class MessageController extends WorkbenchTreeController {
|
|||||||
if (element.selection) {
|
if (element.selection) {
|
||||||
let selection: ISelectionData = element.selection;
|
let selection: ISelectionData = element.selection;
|
||||||
// this is a batch statement
|
// this is a batch statement
|
||||||
let control = this.workbenchEditorService.activeControl.getControl() as IEditor;
|
let input = this.workbenchEditorService.activeEditor as QueryInput;
|
||||||
control.setSelection({
|
input.updateSelection(selection);
|
||||||
startColumn: selection.startColumn + 1,
|
|
||||||
endColumn: selection.endColumn + 1,
|
|
||||||
endLineNumber: selection.endLine + 1,
|
|
||||||
startLineNumber: selection.startLine + 1
|
|
||||||
});
|
|
||||||
control.focus();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user