提交 0f78fdcd 编写于 作者: J Johannes Rieken 提交者: GitHub

Merge pull request #34864 from mjbvz/fix-34863

Check type of token that triggered the quick suggestions
......@@ -301,11 +301,11 @@ export class SuggestModel implements IDisposable {
} else if (quickSuggestions === true) {
// all good
} else {
// Check the type of the token that triggered this
model.tokenizeIfCheap(pos.lineNumber);
const { tokenType } = model
.getLineTokens(pos.lineNumber)
.findTokenAtOffset(pos.column - 1);
.findTokenAtOffset(Math.max(pos.column - 1 - 1, 0));
const inValidScope = quickSuggestions.other && tokenType === StandardTokenType.Other
|| quickSuggestions.comments && tokenType === StandardTokenType.Comment
|| quickSuggestions.strings && tokenType === StandardTokenType.String;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册