This commit is contained in:
rebornix 2021-06-30 12:45:23 -07:00
parent bf013916b4
commit 73fb9ad057

View file

@ -34,6 +34,7 @@ import { MenuId } from 'vs/platform/actions/common/actions';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { INTERACTIVE_INPUT_CURSOR_BOUNDARY } from 'vs/workbench/contrib/interactive/browser/interactiveCommon';
import { IInteractiveHistoryService } from 'vs/workbench/contrib/interactive/browser/interactiveHistoryService';
import { ComplexNotebookEditorModel } from 'vs/workbench/contrib/notebook/common/notebookEditorModel';
const DECORATION_KEY = 'interactiveInputDecoration';
@ -155,6 +156,10 @@ export class InteractiveEditor extends EditorPane {
isReadOnly: true
});
this.#widgetDisposableStore.add(model.notebook.onDidChangeContent(() => {
(model as ComplexNotebookEditorModel).setDirty(false);
}));
const editorModel = input.resolveInput(this.#notebookWidget.value?.activeKernel?.supportedLanguages[0] ?? 'plaintext');
this.#codeEditorWidget.setModel(editorModel);
this.#widgetDisposableStore.add(this.#codeEditorWidget.onDidContentSizeChange(e => {