mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-27 03:54:24 +01:00
Check the correct previous text for suggestions
This commit is contained in:
@@ -459,7 +459,7 @@ class TypeScriptCompletionItemProvider implements vscode.CompletionItemProvider
|
||||
if (position.character > 1) {
|
||||
const preText = document.getText(new vscode.Range(
|
||||
position.line, 0,
|
||||
position.line, position.character - 1));
|
||||
position.line, position.character));
|
||||
return preText.match(/(^|[a-z_$\(\)\[\]\{\}]|[^.]\.)\s*$/ig) !== null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user