mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 20:57:12 +00:00
This commit is contained in:
@@ -2630,11 +2630,14 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
|
||||
const existingOutput = this._webview.insetMapping.get(output.source);
|
||||
if (!existingOutput
|
||||
|| (!existingOutput.renderer && output.type === RenderOutputType.Extension)
|
||||
|| (existingOutput.renderer
|
||||
&& output.type === RenderOutputType.Extension
|
||||
&& existingOutput.renderer.id !== output.renderer.id)
|
||||
) {
|
||||
this._webview.createOutput({ cellId: cell.id, cellHandle: cell.handle, cellUri: cell.uri }, output, cellTop, offset);
|
||||
} else if (existingOutput.renderer
|
||||
&& output.type === RenderOutputType.Extension
|
||||
&& existingOutput.renderer.id !== output.renderer.id) {
|
||||
// switch mimetype
|
||||
this._webview.removeInsets([output.source]);
|
||||
this._webview.createOutput({ cellId: cell.id, cellHandle: cell.handle, cellUri: cell.uri }, output, cellTop, offset);
|
||||
} else {
|
||||
const outputIndex = cell.outputsViewModels.indexOf(output.source);
|
||||
const outputOffset = cell.getOutputOffset(outputIndex);
|
||||
|
||||
Reference in New Issue
Block a user