The Fast Edit model (Claude Sonnet 3.5) has a mechanism to echo unaltered text instead of regenerating it... so you don't have to limit your context to a subset of a file, just give it the entire thing and ask it to make the changes and seconds later you can review and/or try again.