fix(commands): show line range in goto prompt#1983
fix(commands): show line range in goto prompt#1983bajrangCoder merged 2 commits intoAcode-Foundation:mainfrom
Conversation
Greptile SummaryThis PR enhances the "Go to line" command ( Key changes:
Confidence Score: 4/5Safe to merge with one targeted fix: re-read the active editor after the prompt resolves to avoid a stale reference on The feature itself is correct and the UX improvement is clear. The only concern is a minor behavioural regression where the editor reference used for src/lib/commands.js — specifically the Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant goto as goto()
participant editorManager
participant prompt as prompt()
participant editor as editor
User->>goto: trigger "Go to line"
goto->>editorManager: destructure editor
editorManager-->>goto: editor reference (snapshot)
goto->>editor: read state.doc.lines (lastLine)
editor-->>goto: line count (e.g. 250)
goto->>prompt: show "Enter line number (1..250)"
prompt-->>goto: user input (e.g. "42.5")
goto->>goto: parse lineStr, colStr
goto->>editor: gotoLine(lineStr, colStr) — uses snapshot editor
Reviews (1): Last reviewed commit: "fix(commands): show line range in goto p..." | Re-trigger Greptile |
Fixes: #1979