Use Cursor --goto for file targets with line/column suffixes#91
Merged
juliusmarminge merged 2 commits intomainfrom Feb 27, 2026
Merged
Use Cursor --goto for file targets with line/column suffixes#91juliusmarminge merged 2 commits intomainfrom
--goto for file targets with line/column suffixes#91juliusmarminge merged 2 commits intomainfrom
Conversation
- detect `:line` and `:line:column` suffixes in open targets - pass `--goto` when launching Cursor so it jumps to the cursor location - add tests covering both line-only and line+column targets
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Organization UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
WalkthroughAdds a regex and helper to detect line/column suffixes and conditionally pass a Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
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.
Summary
resolveEditorLaunchto detect:lineand:line:columnsuffixes in file targets--gotowhen launching Cursor with line/column-qualified targets:lineand:line:columntarget formatsTesting
apps/server/src/open.test.tsverifies Cursor uses--gotofor/tmp/workspace/AGENTS.md:48apps/server/src/open.test.tsverifies Cursor uses--gotofor/tmp/workspace/src/open.ts:71:5resolveEditorLaunchNote
Low Risk
Low risk: small, isolated change to
resolveEditorLaunchargument construction for thecursoreditor plus a couple of unit tests; main risk is edge-case mis-detection of:line[:col]suffixes affecting launch args.Overview
Updates
resolveEditorLaunchto detect:<line>/:<line>:<column>suffixes and, when launching thecursoreditor, prepend--gotoso Cursor jumps to the specified position.Adds unit coverage for both line-only and line+column Cursor targets, and tweaks chat markdown code styling by explicitly setting font sizes for inline and block code.
Written by Cursor Bugbot for commit 76b290d. This will update automatically on new commits. Configure here.
Note
Prefix '--goto' to 'cursor' editor launch args in
apps/server/src/open.tswhen targets include ':' or '::' to honor file position on darwinAdd
LINE_COLUMN_SUFFIX_PATTERNandshouldUseGotoFlagand modifyresolveEditorLaunchto insert--gotofor 'cursor' when the target includes a line or line:column suffix; add a test in open.test.ts; adjust chat code font sizes in index.css.📍Where to Start
Start with the
resolveEditorLaunchlogic in open.ts, then review the regex inLINE_COLUMN_SUFFIX_PATTERNand theshouldUseGotoFlaghelper; validate with the new test in open.test.ts.Macroscope summarized 76b290d.
Summary by CodeRabbit
Bug Fixes
Tests
Style