mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-06-19 18:15:09 -04:00
Merge from vscode e6a45f4242ebddb7aa9a229f85555e8a3bd987e2 (#9253)
* Merge from vscode e6a45f4242ebddb7aa9a229f85555e8a3bd987e2 * skip failing tests * remove github-authentication extensions * ignore github compile steps * ignore github compile steps * check in compiled files
This commit is contained in:
@@ -756,6 +756,15 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
);
|
||||
}
|
||||
|
||||
public revealRangeNearTopIfOutsideViewport(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void {
|
||||
this._revealRange(
|
||||
range,
|
||||
VerticalRevealType.NearTopIfOutsideViewport,
|
||||
true,
|
||||
scrollType
|
||||
);
|
||||
}
|
||||
|
||||
public revealRangeAtTop(range: IRange, scrollType: editorCommon.ScrollType = editorCommon.ScrollType.Smooth): void {
|
||||
this._revealRange(
|
||||
range,
|
||||
@@ -1534,11 +1543,18 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
};
|
||||
}
|
||||
|
||||
const onDidChangeTextFocus = (textFocus: boolean) => {
|
||||
if (this._modelData) {
|
||||
this._modelData.cursor.setHasFocus(textFocus);
|
||||
}
|
||||
this._editorTextFocus.setValue(textFocus);
|
||||
};
|
||||
|
||||
const viewOutgoingEvents = new ViewOutgoingEvents(viewModel);
|
||||
viewOutgoingEvents.onDidContentSizeChange = (e) => this._onDidContentSizeChange.fire(e);
|
||||
viewOutgoingEvents.onDidScroll = (e) => this._onDidScrollChange.fire(e);
|
||||
viewOutgoingEvents.onDidGainFocus = () => this._editorTextFocus.setValue(true);
|
||||
viewOutgoingEvents.onDidLoseFocus = () => this._editorTextFocus.setValue(false);
|
||||
viewOutgoingEvents.onDidGainFocus = () => onDidChangeTextFocus(true);
|
||||
viewOutgoingEvents.onDidLoseFocus = () => onDidChangeTextFocus(false);
|
||||
viewOutgoingEvents.onContextMenu = (e) => this._onContextMenu.fire(e);
|
||||
viewOutgoingEvents.onMouseDown = (e) => this._onMouseDown.fire(e);
|
||||
viewOutgoingEvents.onMouseUp = (e) => this._onMouseUp.fire(e);
|
||||
@@ -1579,7 +1595,7 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
this._modelData = null;
|
||||
|
||||
this._domElement.removeAttribute('data-mode-id');
|
||||
if (removeDomNode) {
|
||||
if (removeDomNode && this._domElement.contains(removeDomNode)) {
|
||||
this._domElement.removeChild(removeDomNode);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user