Skip to content

Commit cc5f790

Browse files
committed
apply requested changes
1 parent f4e4f21 commit cc5f790

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/services/completions.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -875,10 +875,10 @@ namespace ts.Completions {
875875
if (match && reJSDocFragment.lastIndex === jsdocFragment.length) {
876876
return {
877877
kind: match[1]
878-
// The current position is next to the '@' sign, when no tag name being provided yet.
879-
// Provide a full list of tag names
880-
? CompletionDataKind.JsDocTagName:
881-
CompletionDataKind.JsDocTag
878+
// The current position is next to the '@' sign, when no tag name being provided yet.
879+
// Provide a full list of tag names
880+
? CompletionDataKind.JsDocTagName
881+
: CompletionDataKind.JsDocTag
882882
};
883883
}
884884
}
@@ -888,6 +888,9 @@ namespace ts.Completions {
888888
// Completion should work in the brackets
889889
const tag = getJsDocTagAtPosition(currentToken, position);
890890
if (tag) {
891+
if (tag.tagName.pos <= position && position <= tag.tagName.end) {
892+
return { kind: CompletionDataKind.JsDocTagName };
893+
}
891894
if (isTagWithTypeExpression(tag) && tag.typeExpression && tag.typeExpression.kind === SyntaxKind.JSDocTypeExpression) {
892895
currentToken = getTokenAtPosition(sourceFile, position);
893896
if (!currentToken ||

0 commit comments

Comments
 (0)