Skip to content

Commit 366edd2

Browse files
committed
layer breaker
1 parent e62ccab commit 366edd2

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ import { isMacintosh, isNative } from 'vs/base/common/platform';
6060
import { getTitleBarStyle } from 'vs/platform/windows/common/windows';
6161
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
6262
import { CellDragAndDropController } from 'vs/workbench/contrib/notebook/browser/view/renderers/dnd';
63+
import { RangeMapWithWhitespace } from 'vs/workbench/contrib/notebook/browser/view/rangeMapWithWhitespace';
6364

6465
const $ = DOM.$;
6566

@@ -442,6 +443,7 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
442443
onFocusPrevious: (applyFocusPrevious: () => void) => this._updateForCursorNavigationMode(applyFocusPrevious),
443444
}
444445
},
446+
new RangeMapWithWhitespace()
445447
);
446448
this._dndController.setList(this._list);
447449

src/vs/workbench/contrib/notebook/browser/view/notebookCellList.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
6868
private readonly _focusNextPreviousDelegate: IFocusNextPreviousDelegate;
6969

7070
private _cellListGutter: WorkbenchList<CellViewModel>;
71-
private _rangeMap = new RangeMapWithWhitespace();
71+
private _rangeMap: RangeMapWithWhitespace;
7272

7373
constructor(
7474
private listUser: string,
@@ -78,6 +78,7 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
7878
renderers: IListRenderer<CellViewModel, BaseCellRenderTemplate>[],
7979
contextKeyService: IContextKeyService,
8080
options: INotebookCellListOptions,
81+
rangeMap: RangeMapWithWhitespace,
8182
@IListService listService: IListService,
8283
@IThemeService themeService: IThemeService,
8384
@IConfigurationService configurationService: IConfigurationService,
@@ -87,9 +88,10 @@ export class NotebookCellList extends WorkbenchList<CellViewModel> implements ID
8788
super(listUser, container, delegate, renderers, {
8889
...options,
8990
rangeMapProvider: () => {
90-
return this._rangeMap;
91+
return rangeMap;
9192
}
9293
}, contextKeyService, listService, themeService, configurationService, keybindingService);
94+
this._rangeMap = rangeMap;
9395
NOTEBOOK_CELL_LIST_FOCUSED.bindTo(this.contextKeyService).set(true);
9496
this._focusNextPreviousDelegate = options.focusNextPreviousDelegate;
9597
this._previousFocusedElements = this.getFocusedElements();

0 commit comments

Comments
 (0)