mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
@@ -562,6 +562,24 @@ export class NotebookViewModel extends Disposable implements EditorFoldingStateD
|
||||
return index + 1;
|
||||
}
|
||||
|
||||
getPreviousVisibleCellIndex(index: number) {
|
||||
for (let i = this._hiddenRanges.length - 1; i >= 0; i--) {
|
||||
const cellRange = this._hiddenRanges[i];
|
||||
const foldStart = cellRange.start - 1;
|
||||
const foldEnd = cellRange.end;
|
||||
|
||||
if (foldEnd < index) {
|
||||
return index;
|
||||
}
|
||||
|
||||
if (foldStart <= index) {
|
||||
return foldStart;
|
||||
}
|
||||
}
|
||||
|
||||
return index + 1;
|
||||
}
|
||||
|
||||
hasCell(cell: ICellViewModel) {
|
||||
return this._handleToViewCellMapping.has(cell.handle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user