提交 ba42d4dd 编写于 作者: A Alex Dima

Expose missing standalone editor API

上级 fe21b0aa
......@@ -129,6 +129,8 @@ export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorC
}
export interface IDiffNavigator {
revealFirst: boolean;
canNavigate(): boolean;
next(): void;
previous(): void;
......
......@@ -3180,7 +3180,6 @@ export interface ILineChange extends IChange {
}
/**
* Information about a line in the diff editor
* @internal
*/
export interface IDiffLineInformation {
readonly equivalentLineNumber: number;
......@@ -4065,14 +4064,12 @@ export interface ICommonDiffEditor extends IEditor {
/**
* Get information based on computed diff about a line number from the original model.
* If the diff computation is not finished or the model is missing, will return null.
* @internal
*/
getDiffLineInformationForOriginal(lineNumber: number): IDiffLineInformation;
/**
* Get information based on computed diff about a line number from the modified model.
* If the diff computation is not finished or the model is missing, will return null.
* @internal
*/
getDiffLineInformationForModified(lineNumber: number): IDiffLineInformation;
......
......@@ -45,7 +45,7 @@ export class DiffNavigator extends EventEmitter {
private nextIdx: number;
private ranges: IDiffRange[];
private ignoreSelectionChange: boolean;
private revealFirst: boolean;
public revealFirst: boolean;
constructor(editor: ICommonDiffEditor, options: Options = {}) {
super([
......
......@@ -796,6 +796,7 @@ declare module monaco.editor {
export function createDiffEditor(domElement: HTMLElement, options?: IDiffEditorConstructionOptions, override?: IEditorOverrideServices): IStandaloneDiffEditor;
export interface IDiffNavigator {
revealFirst: boolean;
canNavigate(): boolean;
next(): void;
previous(): void;
......@@ -2867,6 +2868,13 @@ declare module monaco.editor {
readonly charChanges: ICharChange[];
}
/**
* Information about a line in the diff editor
*/
export interface IDiffLineInformation {
readonly equivalentLineNumber: number;
}
export interface INewScrollPosition {
scrollLeft?: number;
scrollTop?: number;
......@@ -3308,6 +3316,16 @@ declare module monaco.editor {
* Get the computed diff information.
*/
getLineChanges(): ILineChange[];
/**
* Get information based on computed diff about a line number from the original model.
* If the diff computation is not finished or the model is missing, will return null.
*/
getDiffLineInformationForOriginal(lineNumber: number): IDiffLineInformation;
/**
* Get information based on computed diff about a line number from the modified model.
* If the diff computation is not finished or the model is missing, will return null.
*/
getDiffLineInformationForModified(lineNumber: number): IDiffLineInformation;
/**
* @see ICodeEditor.getValue
*/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册