Skip to content

Commit ab5ce84

Browse files
committed
Minor fixes in getSignatureHelpItems
1 parent f4ed98f commit ab5ce84

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/services/services.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,7 +2268,7 @@ module ts {
22682268
result.push(getDefinitionInfo(declarations[declarations.length - 1], symbolKind, symbolName, containerName));
22692269
return true;
22702270
}
2271-
2271+
22722272
return false;
22732273
}
22742274

@@ -2469,7 +2469,7 @@ module ts {
24692469
break;
24702470
}
24712471
}
2472-
2472+
24732473
if (shouldHighlightNextKeyword) {
24742474
result.push(new ReferenceEntry(filename, TypeScript.TextSpan.fromBounds(elseKeyword.getStart(), ifKeyword.end), /* isWriteAccess */ false));
24752475
i++; // skip the next keyword
@@ -3581,13 +3581,16 @@ module ts {
35813581
selectedItemIndex = 0;
35823582
}
35833583

3584-
var applicableSpan = new TypeScript.TextSpan(argumentListOrTypeArgumentList.getFullStart(), argumentListOrTypeArgumentList.end);
3584+
var applicableSpanStart = argumentListOrTypeArgumentList.getFullStart();
3585+
var applicableSpanEnd = skipTrivia(sourceFile.text, argumentListOrTypeArgumentList.end, /*stopAfterLineBreak*/ false);
3586+
var applicableSpan = new TypeScript.TextSpan(applicableSpanStart, applicableSpanEnd - applicableSpanStart);
35853587
return new SignatureHelpItems(items, applicableSpan, selectedItemIndex);
35863588
}
35873589

35883590
synchronizeHostData();
35893591

35903592
// Decide whether to show signature help
3593+
fileName = TypeScript.switchToForwardSlashes(fileName);
35913594
var sourceFile = getSourceFile(fileName);
35923595
var node = getNodeAtPosition(sourceFile, position);
35933596

0 commit comments

Comments
 (0)