enable enhanced text diff view for notebook by default.

This commit is contained in:
rebornix
2020-08-27 11:38:13 -07:00
parent 20e9b0b78f
commit 3bd7c6981e
2 changed files with 8 additions and 2 deletions
@@ -30,7 +30,7 @@ import { NotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookEd
import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/browser/notebookEditorInput';
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
import { NotebookService } from 'vs/workbench/contrib/notebook/browser/notebookServiceImpl';
import { CellKind, CellToolbarLocKey, CellUri, DisplayOrderKey, getCellUndoRedoComparisonKey, NotebookDocumentBackupData, NotebookEditorPriority, ShowCellStatusbarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { CellKind, CellToolbarLocKey, CellUri, DisplayOrderKey, getCellUndoRedoComparisonKey, NotebookDocumentBackupData, NotebookEditorPriority, NotebookTextDiffEditorPreview, ShowCellStatusbarKey } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { NotebookProviderInfo } from 'vs/workbench/contrib/notebook/common/notebookProvider';
import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IEditorService, IOpenEditorOverride } from 'vs/workbench/services/editor/common/editorService';
@@ -249,7 +249,7 @@ export class NotebookContribution extends Disposable implements IWorkbenchContri
return undefined;
}
if (originalInput instanceof DiffEditorInput && this.configurationService.getValue('notebook.diff.enablePreview')) {
if (originalInput instanceof DiffEditorInput && this.configurationService.getValue(NotebookTextDiffEditorPreview)) {
return this._handleDiffEditorInput(originalInput, options, group);
}
@@ -546,6 +546,11 @@ configurationRegistry.registerConfiguration({
description: nls.localize('notebook.showCellStatusbar.description', "Whether the cell statusbar should be shown."),
type: 'boolean',
default: true
},
[NotebookTextDiffEditorPreview]: {
description: nls.localize('notebook.diff.enablePreview.description', "Whether to use the enhanced text diff editor for notebook."),
type: 'boolean',
default: true
}
}
});
@@ -789,6 +789,7 @@ export interface INotebookCellStatusBarEntry {
export const DisplayOrderKey = 'notebook.displayOrder';
export const CellToolbarLocKey = 'notebook.cellToolbarLocation';
export const ShowCellStatusbarKey = 'notebook.showCellStatusbar';
export const NotebookTextDiffEditorPreview = 'notebook.diff.enablePreview';
export const enum CellStatusbarAlignment {
LEFT,