提交 873ac56c 编写于 作者: R Rob Lourens

Don't show both hovers in cell while debugging

Fix #127676
上级 8d3ce8d7
......@@ -115,6 +115,13 @@ export class CellEditorOptions extends Disposable {
return computed;
}
getUpdatedValue(internalMetadata?: NotebookCellInternalMetadata): IEditorOptions {
const options = this.getValue(internalMetadata);
delete options.hover; // This is toggled by a debug editor contribution
return options;
}
getValue(internalMetadata?: NotebookCellInternalMetadata): IEditorOptions {
return {
...this._value,
......
......@@ -429,7 +429,7 @@ export class MarkupCellRenderer extends AbstractCellRenderer implements IListRen
const scopedInstaService = this.instantiationService.createChild(new ServiceCollection([IContextKeyService, templateData.contextKeyService]));
const markdownCell = scopedInstaService.createInstance(StatefulMarkdownCell, this.notebookEditor, element, templateData, cellEditorOptions.getValue(element.internalMetadata), this.renderedEditors,);
elementDisposables.add(markdownCell);
elementDisposables.add(cellEditorOptions.onDidChange(newValue => markdownCell.updateEditorOptions(cellEditorOptions.getValue(element.internalMetadata))));
elementDisposables.add(cellEditorOptions.onDidChange(newValue => markdownCell.updateEditorOptions(cellEditorOptions.getUpdatedValue(element.internalMetadata))));
templateData.statusBar.update(toolbarContext);
}
......@@ -1000,8 +1000,8 @@ export class CodeCellRenderer extends AbstractCellRenderer implements IListRende
const cellEditorOptions = new CellEditorOptions(this.notebookEditor, this.notebookEditor.notebookOptions, this.configurationService, element.language);
elementDisposables.add(cellEditorOptions);
elementDisposables.add(cellEditorOptions.onDidChange(() => templateData.editor.updateOptions(cellEditorOptions.getValue(element.internalMetadata))));
templateData.editor.updateOptions(cellEditorOptions.getValue(element.internalMetadata));
elementDisposables.add(cellEditorOptions.onDidChange(() => templateData.editor.updateOptions(cellEditorOptions.getUpdatedValue(element.internalMetadata))));
templateData.editor.updateOptions(cellEditorOptions.getUpdatedValue(element.internalMetadata));
elementDisposables.add(new CellContextKeyManager(templateData.contextKeyService, this.notebookEditor, element));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册