mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-29 17:41:32 +01:00
Merge pull request #187692 from microsoft/hediet/b/cool-wolverine
Fixes #187063
This commit is contained in:
@@ -1086,6 +1086,12 @@ export interface ICodeEditor extends editorCommon.IEditor {
|
||||
hasModel(): this is IActiveCodeEditor;
|
||||
|
||||
setBanner(bannerDomNode: HTMLElement | null, height: number): void;
|
||||
|
||||
/**
|
||||
* Is called when the model has been set, view state was restored and options are updated.
|
||||
* This is the best place to compute data for the viewport (such as tokens).
|
||||
*/
|
||||
handleInitialized?(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1021,6 +1021,10 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
|
||||
}
|
||||
}
|
||||
|
||||
public handleInitialized(): void {
|
||||
this._getViewModel()?.visibleLinesStabilized();
|
||||
}
|
||||
|
||||
public onVisible(): void {
|
||||
this._modelData?.view.refreshFocusState();
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ class AttachedViewHandler extends Disposable {
|
||||
}
|
||||
|
||||
private update(): void {
|
||||
if (equals(this._computedLineRanges, this._lineRanges)) {
|
||||
if (equals(this._computedLineRanges, this._lineRanges, (a, b) => a.equals(b))) {
|
||||
return;
|
||||
}
|
||||
this._computedLineRanges = this._lineRanges;
|
||||
|
||||
Vendored
+5
@@ -6065,6 +6065,11 @@ declare namespace monaco.editor {
|
||||
*/
|
||||
applyFontInfo(target: HTMLElement): void;
|
||||
setBanner(bannerDomNode: HTMLElement | null, height: number): void;
|
||||
/**
|
||||
* Is called when the model has been set, view state was restored and options are updated.
|
||||
* This is the best place to compute data for the viewport (such as tokens).
|
||||
*/
|
||||
handleInitialized?(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,6 +148,10 @@ export class TextFileEditor extends AbstractTextCodeEditor<ICodeEditorViewState>
|
||||
// a resolved model might have more specific information about being
|
||||
// readonly or not that the input did not have.
|
||||
control.updateOptions(this.getReadonlyConfiguration(textFileModel.isReadonly()));
|
||||
|
||||
if (control.handleInitialized) {
|
||||
control.handleInitialized();
|
||||
}
|
||||
} catch (error) {
|
||||
await this.handleSetInputError(error, input, options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user