From d423aadc72c5247db5f674f7277429bcf39fc6af Mon Sep 17 00:00:00 2001 From: Arthur Ozga Date: Mon, 26 Sep 2016 13:34:07 -0700 Subject: [PATCH] comments --- src/services/completions.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/services/completions.ts b/src/services/completions.ts index d6a4da89ed1..00a5f80379b 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -323,12 +323,12 @@ namespace ts.Completions { } function getCompletionEntriesForDirectoryFragment(fragment: string, scriptPath: string, extensions: string[], includeExtensions: boolean, span: TextSpan, exclude?: string, result: CompletionEntry[] = []): CompletionEntry[] { - fragment = getDirectoryPath(fragment); + fragment = getDirectoryPath(fragment); // TODO: modify fragment so it respects our internal path representation? if (!fragment) { - fragment = "./"; + fragment = "." + directorySeparator; } else { - fragment = ensureTrailingDirectorySeparator(fragment); + fragment = ensureTrailingDirectorySeparator(fragment); // TODO: why is this necessary? } const absolutePath = normalizeAndPreserveTrailingSlash(isRootedDiskPath(fragment) ? fragment : combinePaths(scriptPath, fragment)); @@ -544,7 +544,7 @@ namespace ts.Completions { const kind = match[2]; const toComplete = match[3]; - const scriptPath = getDirectoryPath(sourceFile.path); + const scriptPath = getDirectoryPath(sourceFile.path); // TODO: normalize for win10? let entries: CompletionEntry[]; if (kind === "path") { // Give completions for a relative path