Skip to content

Commit a9c43b5

Browse files
authored
promote nb diff overview ruler setting (microsoft#178599)
1 parent 4e05fbb commit a9c43b5

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

src/vs/workbench/contrib/notebook/browser/diff/notebookDiffEditor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { DiffSide, DIFF_CELL_MARGIN, IDiffCellInfo, INotebookTextDiffEditor } fr
2929
import { Emitter, Event } from 'vs/base/common/event';
3030
import { DisposableStore, IDisposable, toDisposable } from 'vs/base/common/lifecycle';
3131
import { EditorPane } from 'vs/workbench/browser/parts/editor/editorPane';
32-
import { CellUri, INotebookDiffEditorModel, INotebookDiffResult, NOTEBOOK_DIFF_EDITOR_ID } from 'vs/workbench/contrib/notebook/common/notebookCommon';
32+
import { CellUri, INotebookDiffEditorModel, INotebookDiffResult, NOTEBOOK_DIFF_EDITOR_ID, NotebookSetting } from 'vs/workbench/contrib/notebook/common/notebookCommon';
3333
import { URI } from 'vs/base/common/uri';
3434
import { IDiffChange, IDiffResult } from 'vs/base/common/diff/diff';
3535
import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel';
@@ -159,7 +159,7 @@ export class NotebookTextDiffEditor extends EditorPane implements INotebookTextD
159159
}
160160

161161
private isOverviewRulerEnabled(): boolean {
162-
return this.configurationService.getValue('notebook.experimental.diffOverviewRuler.enabled') ?? false;
162+
return this.configurationService.getValue(NotebookSetting.diffOverviewRuler) ?? false;
163163
}
164164

165165
getSelection(): IEditorPaneSelection | undefined {

src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,12 @@ configurationRegistry.registerConfiguration({
770770
default: true,
771771
tags: ['notebookLayout']
772772
},
773+
[NotebookSetting.diffOverviewRuler]: {
774+
description: nls.localize('notebook.diff.enableOverviewRuler.description', "Whether to render the overview ruler in the diff editor for notebook."),
775+
type: 'boolean',
776+
default: false,
777+
tags: ['notebookLayout']
778+
},
773779
[NotebookSetting.cellToolbarVisibility]: {
774780
markdownDescription: nls.localize('notebook.cellToolbarVisibility.description', "Whether the cell toolbar should appear on hover or click."),
775781
type: 'string',

src/vs/workbench/contrib/notebook/common/notebookCommon.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,7 @@ export const NotebookSetting = {
911911
cellToolbarVisibility: 'notebook.cellToolbarVisibility',
912912
showCellStatusBar: 'notebook.showCellStatusBar',
913913
textDiffEditorPreview: 'notebook.diff.enablePreview',
914+
diffOverviewRuler: 'notebook.diff.overviewRuler',
914915
experimentalInsertToolbarAlignment: 'notebook.experimental.insertToolbarAlignment',
915916
compactView: 'notebook.compactView',
916917
focusIndicator: 'notebook.cellFocusIndicator',

0 commit comments

Comments
 (0)