mirror of
https://github.com/Microsoft/vscode
synced 2024-07-05 01:08:57 +00:00
Merge pull request #187692 from microsoft/hediet/b/cool-wolverine
Fixes #187063
This commit is contained in:
commit
ba8caef810
|
@ -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;
|
||||
|
|
5
src/vs/monaco.d.ts
vendored
5
src/vs/monaco.d.ts
vendored
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user