Skip to content

Commit da51f39

Browse files
author
Yui T
committed
FIx minor stuffs
1 parent 34b6809 commit da51f39

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/services/completions.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ namespace ts.Completions {
5959
}
6060

6161
// Add keywords if this is not a member completion list
62-
if (!isMemberCompletion && !(requestJsDocTag && requestJsDocTagName)) {
62+
if (!isMemberCompletion && !requestJsDocTag && !requestJsDocTagName) {
6363
addRange(entries, keywordCompletions);
6464
}
6565

@@ -858,7 +858,7 @@ namespace ts.Completions {
858858
// * |c|
859859
// */
860860
const lineStart = getLineStartPositionForPosition(position, sourceFile);
861-
requestJsDocTag = !(sourceFile.text.substr(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
861+
requestJsDocTag = !(sourceFile.text.substring(lineStart, position).match(/[^\*|\s|(/\*\*)]/));
862862
}
863863
}
864864

tests/cases/fourslash/completionInJsDoc.ts

+9-4
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,24 @@
3535
//// /**
3636
//// * /*11*/
3737
//// */
38-
38+
////
3939
//// /**
4040
//// /*12*/
4141
//// */
42-
42+
////
4343
//// /**
4444
//// * /*13*/
4545
//// */
46-
46+
////
4747
//// /**
4848
//// * some comment /*14*/
4949
//// */
50-
50+
////
5151
//// /**
5252
//// * @param /*15*/
5353
//// */
54+
////
55+
//// /** @param /*16*/ */
5456

5557
goTo.marker('1');
5658
verify.completionListContains("constructor");
@@ -105,4 +107,7 @@ goTo.marker('14');
105107
verify.completionListIsEmpty();
106108

107109
goTo.marker('15');
110+
verify.completionListIsEmpty();
111+
112+
goTo.marker('16');
108113
verify.completionListIsEmpty();

0 commit comments

Comments
 (0)