Skip to content

Commit

Permalink
FIx minor stuffs
Browse files Browse the repository at this point in the history
  • Loading branch information
Yui T committed Mar 2, 2017
1 parent 34b6809 commit da51f39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/services/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace ts.Completions {
}

// Add keywords if this is not a member completion list
if (!isMemberCompletion && !(requestJsDocTag && requestJsDocTagName)) {
if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
addRange(entries, keywordCompletions);
}

Expand Down Expand Up @@ -858,7 +858,7 @@ namespace ts.Completions {
// * |c|
// */
const lineStart = getLineStartPositionForPosition(position, sourceFile);
requestJsDocTag = !(sourceFile.text.substr(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
}
}

Expand Down
13 changes: 9 additions & 4 deletions tests/cases/fourslash/completionInJsDoc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,22 +35,24 @@
//// /**
//// * /*11*/
//// */

////
//// /**
//// /*12*/
//// */

////
//// /**
//// * /*13*/
//// */

////
//// /**
//// * some comment /*14*/
//// */

////
//// /**
//// * @param /*15*/
//// */
////
//// /** @param /*16*/ */

goTo.marker('1');
verify.completionListContains("constructor");
Expand Down Expand Up @@ -105,4 +107,7 @@ goTo.marker('14');
verify.completionListIsEmpty();

goTo.marker('15');
verify.completionListIsEmpty();

goTo.marker('16');
verify.completionListIsEmpty();

0 comments on commit da51f39

Please sign in to comment.