File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -2486,7 +2486,7 @@ module ts {
24862486
24872487 // Check if the caret is at the end of an identifier; this is a partial identifier that we want to complete: e.g. a.toS|
24882488 // Skip this partial identifier and adjust the contextToken to the token that precedes it.
2489- if ( contextToken && position <= contextToken . end && contextToken . kind === SyntaxKind . Identifier ) {
2489+ if ( contextToken && position <= contextToken . end && isWord ( contextToken . kind ) ) {
24902490 let start = new Date ( ) . getTime ( ) ;
24912491 contextToken = findPrecedingToken ( contextToken . getFullStart ( ) , sourceFile ) ;
24922492 log ( "getCompletionData: Get previous token 2: " + ( new Date ( ) . getTime ( ) - start ) ) ;
Original file line number Diff line number Diff line change @@ -450,7 +450,7 @@ module ts {
450450 return n . kind >= SyntaxKind . FirstToken && n . kind <= SyntaxKind . LastToken ;
451451 }
452452
453- function isWord ( kind : SyntaxKind ) : boolean {
453+ export function isWord ( kind : SyntaxKind ) : boolean {
454454 return kind === SyntaxKind . Identifier || isKeyword ( kind ) ;
455455 }
456456
You can’t perform that action at this time.
0 commit comments