Skip to content

Commit 367e481

Browse files
committed
expose diff editor decorations.
1 parent 366edd2 commit 367e481

3 files changed

Lines changed: 273 additions & 49 deletions

File tree

src/vs/editor/browser/widget/diffEditorWidget.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ interface IEditorsZones {
7070
modified: IMyViewZone[];
7171
}
7272

73-
interface IDiffEditorWidgetStyle {
73+
export interface IDiffEditorWidgetStyle {
7474
getEditorsDiffDecorations(lineChanges: editorCommon.ILineChange[], ignoreTrimWhitespace: boolean, renderIndicators: boolean, originalWhitespaces: IEditorWhitespace[], modifiedWhitespaces: IEditorWhitespace[], originalEditor: editorBrowser.ICodeEditor, modifiedEditor: editorBrowser.ICodeEditor): IEditorsDiffDecorationsWithZones;
7575
setEnableSplitViewResizing(enableSplitViewResizing: boolean): void;
7676
applyColors(theme: IColorTheme): boolean;
@@ -1610,14 +1610,14 @@ abstract class ViewZonesComputer {
16101610
protected abstract _produceModifiedFromDiff(lineChange: editorCommon.ILineChange, lineChangeOriginalLength: number, lineChangeModifiedLength: number): IMyViewZone | null;
16111611
}
16121612

1613-
function createDecoration(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, options: ModelDecorationOptions) {
1613+
export function createDecoration(startLineNumber: number, startColumn: number, endLineNumber: number, endColumn: number, options: ModelDecorationOptions) {
16141614
return {
16151615
range: new Range(startLineNumber, startColumn, endLineNumber, endColumn),
16161616
options: options
16171617
};
16181618
}
16191619

1620-
const DECORATIONS = {
1620+
export const DECORATIONS = {
16211621

16221622
charDelete: ModelDecorationOptions.register({
16231623
className: 'char-delete'
@@ -1665,7 +1665,7 @@ const DECORATIONS = {
16651665

16661666
};
16671667

1668-
class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEditorWidgetStyle, IVerticalSashLayoutProvider {
1668+
export class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEditorWidgetStyle, IVerticalSashLayoutProvider {
16691669

16701670
static readonly MINIMUM_EDITOR_WIDTH = 100;
16711671

@@ -2193,11 +2193,11 @@ class InlineViewZonesComputer extends ViewZonesComputer {
21932193
}
21942194
}
21952195

2196-
function isChangeOrInsert(lineChange: editorCommon.IChange): boolean {
2196+
export function isChangeOrInsert(lineChange: editorCommon.IChange): boolean {
21972197
return lineChange.modifiedEndLineNumber > 0;
21982198
}
21992199

2200-
function isChangeOrDelete(lineChange: editorCommon.IChange): boolean {
2200+
export function isChangeOrDelete(lineChange: editorCommon.IChange): boolean {
22012201
return lineChange.originalEndLineNumber > 0;
22022202
}
22032203

0 commit comments

Comments
 (0)