Skip to content

Commit

Permalink
Merge pull request #146866 from dlech/patch-9
Browse files Browse the repository at this point in the history
allow null in ICodeEditor.restoreViewState()
  • Loading branch information
alexdima authored May 11, 2022
2 parents 0175770 + 8160478 commit 66fccc7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/vs/editor/browser/editorBrowser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ export interface ICodeEditor extends editorCommon.IEditor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: editorCommon.ICodeEditorViewState): void;
restoreViewState(state: editorCommon.ICodeEditorViewState | null): void;

/**
* Returns true if the text inside this editor or an editor widget has focus.
Expand Down Expand Up @@ -1116,7 +1116,7 @@ export interface IDiffEditor extends editorCommon.IEditor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: editorCommon.IDiffEditorViewState): void;
restoreViewState(state: editorCommon.IDiffEditorViewState | null): void;

/**
* Type the getModel() of IEditor.
Expand Down
2 changes: 1 addition & 1 deletion src/vs/editor/common/editorCommon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export interface IEditor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: IEditorViewState): void;
restoreViewState(state: IEditorViewState | null): void;

/**
* Given a position, returns a column number that takes tab-widths into account.
Expand Down
6 changes: 3 additions & 3 deletions src/vs/monaco.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2373,7 +2373,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: IEditorViewState): void;
restoreViewState(state: IEditorViewState | null): void;
/**
* Given a position, returns a column number that takes tab-widths into account.
*/
Expand Down Expand Up @@ -5124,7 +5124,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: ICodeEditorViewState): void;
restoreViewState(state: ICodeEditorViewState | null): void;
/**
* Returns true if the text inside this editor or an editor widget has focus.
*/
Expand Down Expand Up @@ -5377,7 +5377,7 @@ declare namespace monaco.editor {
/**
* Restores the view state of the editor from a serializable object generated by `saveViewState`.
*/
restoreViewState(state: IDiffEditorViewState): void;
restoreViewState(state: IDiffEditorViewState | null): void;
/**
* Type the getModel() of IEditor.
*/
Expand Down

0 comments on commit 66fccc7

Please sign in to comment.