提交 69fe3463 编写于 作者: J Johannes Rieken

fire quick fix compute event when model changed, fixes #14141

上级 f5311f4e
...@@ -62,10 +62,10 @@ export class QuickFixController implements IEditorContribution { ...@@ -62,10 +62,10 @@ export class QuickFixController implements IEditorContribution {
} }
private _onQuickFixEvent(e: QuickFixComputeEvent): void { private _onQuickFixEvent(e: QuickFixComputeEvent): void {
if (e.type === 'manual') { if (e && e.type === 'manual') {
this._quickFixContextMenu.show(e.fixes, e.position); this._quickFixContextMenu.show(e.fixes, e.position);
} else if (e.fixes) { } else if (e && e.fixes) {
// auto magically triggered // auto magically triggered
// * update an existing list of code actions // * update an existing list of code actions
// * manage light bulb // * manage light bulb
......
...@@ -137,6 +137,10 @@ export class QuickFixModel { ...@@ -137,6 +137,10 @@ export class QuickFixModel {
&& !this._editor.getConfiguration().readOnly) { && !this._editor.getConfiguration().readOnly) {
this._quickFixOracle = new QuickFixOracle(this._editor, this._markerService, p => this._onDidChangeFixes.fire(p)); this._quickFixOracle = new QuickFixOracle(this._editor, this._markerService, p => this._onDidChangeFixes.fire(p));
} else {
// signal unavailable
this._onDidChangeFixes.fire(undefined);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册