Skip to lesson
Exit
Inline Edit with Cmd/Ctrl+K1 / 2

2 min lesson

A selected region is rewritten without inviting broader repository edits

Connect "The job: a selected region is rewritten without inviting broader repository edits" to the decision you would make.

Step 1 of 2

The job: a selected region is rewritten without inviting broader repository edits. Start with this check: The selected boundary was respected. Keep it small enough to check the result yourself instead of taking the summary on trust.

Cmd+K on a helper — rename the variable, not the contract

0:38 · narrated
Read this demo as text
  1. The fix lives inside filterResults — three lines, one local variable. Select just the body, then Cmd+K instead of Agent.
  2. One instruction, one variable, one file. The diff comes back inside the exact selection — read every renamed line before you touch Accept.
  3. Accepted. filterResults still takes the same arguments and returns the same shape. Source Control shows exactly one changed file — the boundary held.
Select the function body, a precise rewrite, then read every changed line before Accept.

Practice next: Now try it yourself: select a small region, name the exact rewrite, and check the diff stays inside your selection.

Simulated Cursor 3.12 (macOS, light) — beta educational reconstruction, not the real product.