mirror of
https://github.com/Microsoft/vscode
synced 2024-09-13 13:46:13 +00:00
parent
2b752cc239
commit
6153117f9e
|
@ -2540,6 +2540,17 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
|
|||
return;
|
||||
}
|
||||
|
||||
if (!this.viewModel) {
|
||||
return;
|
||||
}
|
||||
|
||||
const modelIndex = this.viewModel.getCellIndex(cell);
|
||||
const foldedRanges = this.viewModel.getHiddenRanges();
|
||||
const isVisible = !foldedRanges.some(range => modelIndex >= range.start && modelIndex < range.end);
|
||||
if (!isVisible) {
|
||||
return;
|
||||
}
|
||||
|
||||
const cellTop = this._list.getAbsoluteTopOfElement(cell);
|
||||
await this._webview.showMarkupPreview({
|
||||
mime: cell.mime,
|
||||
|
|
Loading…
Reference in a new issue