提交 380dc634 编写于 作者: P Peng Lyu

Fix #40040. we don't necessarily need to check whether we should trigger...

Fix #40040.  we don't necessarily need to check whether we should trigger suggestions immediately after type. Postpone it to next tick.
上级 d52302cd
......@@ -289,9 +289,9 @@ export class SuggestModel implements IDisposable {
this.cancel();
if (LineContext.shouldAutoTrigger(this._editor)) {
this._triggerAutoSuggestPromise = TPromise.timeout(this._quickSuggestDelay);
this._triggerAutoSuggestPromise.then(() => {
this._triggerAutoSuggestPromise = TPromise.timeout(this._quickSuggestDelay);
this._triggerAutoSuggestPromise.then(() => {
if (LineContext.shouldAutoTrigger(this._editor)) {
const model = this._editor.getModel();
const pos = this._editor.getPosition();
......@@ -319,10 +319,10 @@ export class SuggestModel implements IDisposable {
}
}
this._triggerAutoSuggestPromise = null;
this.trigger({ auto: true });
});
}
}
this._triggerAutoSuggestPromise = null;
});
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册