{"version":"2.1.327","anchor":"edit-diff-dialog-warns-about-partly-drawn-replace-all-diffs","canonical_anchor":"edit-diff-dialog-warns-about-partly-drawn-replace-all-diffs","heading":"Replace-all edits warn before approval and report a truer replacement count","tier":"notice","area":"Edit Tool","scope":"individual","heads_up":false,"url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327\/e\/edit-diff-dialog-warns-about-partly-drawn-replace-all-diffs","release_url":"https:\/\/changelogs.core-directive.com\/v\/2.1.327","markdown":"### Replace-all edits warn before approval and report a truer replacement count\n\nEdits that use replace_all now warn in the permission dialog that they can change more than one place, and report the real number of replacements\n\n**What**\n\nWhen Claude edits a file it can set `replace_all`, which replaces every match of the old text instead of just one. Edits like this are now handled more carefully:\n\n- The edit permission dialog, where you approve or reject an edit, now shows \"This edit can change more than one place in the file.\" when an edit replaces every match.\n\n- A new diff view (the side-by-side view of what an edit removes and adds) warns \"The diff may not show all of what this edit changes: its old text can match in other places.\" This appears when a `replace_all` edit's old text matches in other places and the diff shown is cut short. The diff is now worked out by reading the file to detect diffs that are only partly drawn.\n\n- The replacement count is 1 when `replace_all` is not set. When it is set, Claude Code counts the matches in the original file if it has it. Otherwise it now uses a `replacements` number reported with the result, where it used to fall back to 1.\n\n**Why**\n\nA replace-all edit can change text in places the diff doesn't show, so these warnings give you a cue before you approve a broad change. The count fix means replace-all edits that have no original file to count from report the real number of replacements instead of 1.\n\n- Area: Edit Tool\n- Tier: You'll notice\n- Useful: 3\/5\n- Signal: 2\/5\n- Scope: individual\n- Heads-up: no"}