提交 7f8b6a8c 编写于 作者: J Johannes Rieken

fix an issue with snippet choice

上级 7a13864c
......@@ -83,11 +83,12 @@ export class SnippetController2 {
this._editor.getModel().pushStackElement();
}
this._updateState();
this._snippetListener = [
this._editor.onDidChangeModel(() => this.cancel()),
this._editor.onDidChangeCursorSelection(() => this._updateState())
];
this._updateState();
}
private _updateState(): void {
......
......@@ -236,8 +236,10 @@ SuggestRegistry.register('*', _provider);
* @param suggestions
*/
export function showSimpleSuggestions(editor: ICommonCodeEditor, suggestions: ISuggestion[]) {
setTimeout(() => {
_suggestions = suggestions;
editor.getContribution<SuggestController>('editor.contrib.suggestController').triggerSuggest([_provider]);
_suggestions = undefined;
}, 0);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册