File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -333,9 +333,10 @@ namespace ts.Completions {
333
333
334
334
fragment = normalizeSlashes ( fragment ) ;
335
335
336
- const baseName = getBaseFileName ( fragment ) ;
337
-
338
- // Remove the basename from our directory path
336
+ /**
337
+ * Remove the basename from the path. Note that we don't use the basename to filter completions;
338
+ * the client is responsible for refining completions.
339
+ */
339
340
fragment = getDirectoryPath ( fragment ) ;
340
341
341
342
if ( fragment === "" ) {
@@ -368,11 +369,6 @@ namespace ts.Completions {
368
369
369
370
const foundFileName = includeExtensions ? getBaseFileName ( filePath ) : removeFileExtension ( getBaseFileName ( filePath ) ) ;
370
371
371
- // Only add entries that contain the basename as a substring.
372
- if ( foundFileName . indexOf ( baseName ) === - 1 ) {
373
- continue ;
374
- }
375
-
376
372
if ( ! foundFiles [ foundFileName ] ) {
377
373
foundFiles [ foundFileName ] = true ;
378
374
}
@@ -390,11 +386,6 @@ namespace ts.Completions {
390
386
for ( const directory of directories ) {
391
387
const directoryName = getBaseFileName ( normalizePath ( directory ) ) ;
392
388
393
- // Only add entries that contain the basename as a substring.
394
- if ( directoryName . indexOf ( baseName ) === - 1 ) {
395
- continue ;
396
- }
397
-
398
389
result . push ( createCompletionEntryForModule ( directoryName , ScriptElementKind . directory , span ) ) ;
399
390
}
400
391
}
You can’t perform that action at this time.
0 commit comments