mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-06-18 17:45:08 -04:00
Merge from vscode 817eb6b0c720a4ecbc13c020afbbebfed667aa09 (#7356)
This commit is contained in:
@@ -737,7 +737,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
);
|
||||
}
|
||||
|
||||
public setSelections(ranges: ISelection[], source: string = 'api'): void {
|
||||
public setSelections(ranges: readonly ISelection[], source: string = 'api'): void {
|
||||
if (!this._modelData) {
|
||||
return;
|
||||
}
|
||||
@@ -1172,7 +1172,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
}
|
||||
|
||||
public hasWidgetFocus(): boolean {
|
||||
return (this._editorWidgetFocus.getValue() === BooleanEventValue.True);
|
||||
return this._focusTracker && this._focusTracker.hasFocus();
|
||||
}
|
||||
|
||||
public addContentWidget(widget: editorBrowser.IContentWidget): void {
|
||||
@@ -1452,13 +1452,8 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
}
|
||||
|
||||
const viewOutgoingEvents = new ViewOutgoingEvents(viewModel);
|
||||
viewOutgoingEvents.onDidGainFocus = () => {
|
||||
this._editorTextFocus.setValue(true);
|
||||
// In IE, the focus is not synchronous, so we give it a little help
|
||||
this._editorWidgetFocus.setValue(true);
|
||||
};
|
||||
|
||||
viewOutgoingEvents.onDidScroll = (e) => this._onDidScrollChange.fire(e);
|
||||
viewOutgoingEvents.onDidGainFocus = () => this._editorTextFocus.setValue(true);
|
||||
viewOutgoingEvents.onDidLoseFocus = () => this._editorTextFocus.setValue(false);
|
||||
viewOutgoingEvents.onContextMenu = (e) => this._onContextMenu.fire(e);
|
||||
viewOutgoingEvents.onMouseDown = (e) => this._onMouseDown.fire(e);
|
||||
@@ -1548,10 +1543,6 @@ export class BooleanEventEmitter extends Disposable {
|
||||
this._value = BooleanEventValue.NotSet;
|
||||
}
|
||||
|
||||
public getValue(): BooleanEventValue {
|
||||
return this._value;
|
||||
}
|
||||
|
||||
public setValue(_value: boolean) {
|
||||
const value = (_value ? BooleanEventValue.True : BooleanEventValue.False);
|
||||
if (this._value === value) {
|
||||
|
||||
Reference in New Issue
Block a user