Skip to content

Commit b564a2e

Browse files
authored
Merge pull request #155 from lambdalisue/fix-issue-when-special-chars-in-path
Do NOT expand `path` to support special characters in path.
2 parents 9d83d18 + 78ecf1d commit b564a2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

denops/gin/util/ensure_path.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export async function ensurePath(
1515
denops: Denops,
1616
path?: string,
1717
): Promise<string> {
18-
const bufname = await fn.expand(denops, path ?? "%") as string;
19-
const abspath = await fn.fnamemodify(denops, bufname, ":p");
18+
const expr = path ?? await fn.bufname(denops);
19+
const abspath = await fn.fnamemodify(denops, expr, ":p");
2020
return abspath;
2121
}

0 commit comments

Comments
 (0)