From 07be490344033395208e1b5bb12a07c24691ae49 Mon Sep 17 00:00:00 2001 From: Ekin Akkaya Date: Tue, 21 Jan 2025 17:06:20 +0300 Subject: [PATCH] Fix gf command to handle parent directory references --- src/actions/commands/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/actions/commands/actions.ts b/src/actions/commands/actions.ts index 33322a141f2..f3526f839e9 100644 --- a/src/actions/commands/actions.ts +++ b/src/actions/commands/actions.ts @@ -1032,7 +1032,7 @@ class CommandOpenFile extends BaseCommand { const filePath = path.isAbsolute(fileInfo[1]) || !workspaceRootPath ? fileInfo[1] - : path.join(workspaceRootPath, fileInfo[1]); + : path.resolve(path.dirname(vimState.document.uri.fsPath), fileInfo[1]); const line = parseInt(fileInfo[2], 10); const fileCommand = new FileCommand({ name: 'edit',