Repository navigation
fix: keep line and column for Cursor, Trae and Antigravity on Windows - #163
Open
mkantautas wants to merge 1 commit into
Open
mkantautas wants to merge 1 commit into
mkantautas wants to merge 1 commit into
Conversation
adamchainz
pushed a commit
to adamchainz/launch-editor-py
that referenced
this pull request
Oct 28, 2026
Running editors on Windows are launched by full path, so their capitalized executable names, like Cursor.exe, weren't recognized and the line and column were dropped. Ported from upstream's unmerged vitejs/launch-editor#163. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1f9YvZFt329anqrwH8KGJ
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When automatically detecting an editor on Windows,
guessEditorreturns the full path of the running editor, such asC:\Users\me\AppData\Local\Programs\cursor\Cursor.exe.getArgumentsForFilestrips the directory and.exe, leavingCursor,TraeorAntigravity. The switch only has the lowercase names, so these three editors get just the file name: the requested line and column are not passed to the editor.Code,Code - InsidersandVSCodiumalready have cases for their Windows names.This adds
Cursor,TraeandAntigravitynext to the lowercase cases, so they get-r -g file:line:columnlikeCode.Possibly related: #115 (Antigravity opens the file but not at the line; the report doesn't say which OS).
Tests: the three names are added to the
-r -glist, and the Windows-only block gets full-path.execases. The list tests fail without the fix.pnpm test,pnpm format --checkandpnpm oxlintpass on Node 24 (Linux);pnpm testalso passes on Node 26 (macOS). I ran the Windows-only tests withprocess.platformandpath.win32stubbed, not on Windows, and didn't try the editors themselves.