Skip to content

Commit 5240174

Browse files
Merge pull request #702 from Microsoft/fixRenameSameLine
Apply rename edits in reverse.
2 parents 26bb7c5 + 8331a5f commit 5240174

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typescript/commands/rename.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def run(self, text, args_json=""):
6363
rename_view.run_command('typescript_delayed_rename_file',
6464
{"locs_name": {"locs": inner_locations, "name": new_name}})
6565
else:
66-
for inner_location in inner_locations:
66+
for inner_location in inner_locations[::-1]:
6767
start_line, start_offset = extract_line_offset(inner_location["start"])
6868
end_line, end_offset = extract_line_offset(inner_location["end"])
6969
apply_edit(text, self.view, start_line, start_offset, end_line,

0 commit comments

Comments
 (0)