Skip to content

Commit 24938a7

Browse files
author
Arthur Ozga
committed
Remove filtering functionality
1 parent 617daa9 commit 24938a7

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/services/completions.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,10 @@ namespace ts.Completions {
333333

334334
fragment = normalizeSlashes(fragment);
335335

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+
*/
339340
fragment = getDirectoryPath(fragment);
340341

341342
if (fragment === "") {
@@ -368,11 +369,6 @@ namespace ts.Completions {
368369

369370
const foundFileName = includeExtensions ? getBaseFileName(filePath) : removeFileExtension(getBaseFileName(filePath));
370371

371-
// Only add entries that contain the basename as a substring.
372-
if (foundFileName.indexOf(baseName) === -1) {
373-
continue;
374-
}
375-
376372
if (!foundFiles[foundFileName]) {
377373
foundFiles[foundFileName] = true;
378374
}
@@ -390,11 +386,6 @@ namespace ts.Completions {
390386
for (const directory of directories) {
391387
const directoryName = getBaseFileName(normalizePath(directory));
392388

393-
// Only add entries that contain the basename as a substring.
394-
if (directoryName.indexOf(baseName) === -1) {
395-
continue;
396-
}
397-
398389
result.push(createCompletionEntryForModule(directoryName, ScriptElementKind.directory, span));
399390
}
400391
}

0 commit comments

Comments
 (0)