Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions apps/server/src/process/externalLauncher.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ for (const {} of [
platform: "darwin",
installPath: "Applications/WebStorm.app/Contents/MacOS/webstorm",
editor: "webstorm",
args: ["--line", "12", "--column", "4", "/workspace with spaces/file.ts"],
args: ["--line", "12", "--column", "3", "/workspace with spaces/file.ts"],
},
{
platform: "darwin",
Expand All @@ -364,13 +364,13 @@ for (const {} of [
platform: "win32",
installPath: "Programs/JetBrains/WebStorm 2026.2/bin/webstorm64.exe",
editor: "webstorm",
args: ["--line", "12", "--column", "4", "/workspace with spaces/file.ts"],
args: ["--line", "12", "--column", "3", "/workspace with spaces/file.ts"],
},
{
platform: "win32",
installPath: "Programs/WebStorm/bin/webstorm64.exe",
editor: "webstorm",
args: ["--line", "12", "--column", "4", "/workspace with spaces/file.ts"],
args: ["--line", "12", "--column", "3", "/workspace with spaces/file.ts"],
},
{
platform: "win32",
Expand All @@ -382,7 +382,7 @@ for (const {} of [
platform: "linux",
installPath: ".local/share/JetBrains/Toolbox/scripts/idea",
editor: "idea",
args: ["--line", "12", "--column", "4", "/workspace with spaces/file.ts"],
args: ["--line", "12", "--column", "3", "/workspace with spaces/file.ts"],
},
{
platform: "linux",
Expand Down Expand Up @@ -472,7 +472,7 @@ it.effect.each([
"--line",
"12",
"--column",
"4",
"3",
"/workspace with spaces/file.ts",
]);
}).pipe(Effect.scoped, Effect.provide(NodeServices.layer)),
Expand Down
3 changes: 2 additions & 1 deletion apps/server/src/process/externalLauncher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,10 @@ function resolveCommandEditorArgs(
onSome: ({ path, line, column }) => [
"--line",
line,
// JetBrains IDEs count `--column` from 0; targets count columns from 1.
...Option.match(column, {
onNone: () => [],
onSome: (value) => ["--column", value],
onSome: (value) => ["--column", String(Math.max(0, Number(value) - 1))],
}),
path,
],
Expand Down
Loading