Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't over-escape text edits #152350

Merged
merged 1 commit into from
Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't over-escape text edits
Fixes #152272
mjbvz committed Jun 16, 2022

Verified

This commit was signed with the committer’s verified signature.
mjbvz Matt Bierner
commit e385f7ac8e61301cd27214c963c0d90ca98477cc
3 changes: 1 addition & 2 deletions src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts
Original file line number Diff line number Diff line change
@@ -134,8 +134,7 @@ class EditorEditTask extends ModelEditTask {

} else {
this._edits = this._edits
.sort((a, b) => Range.compareRangesUsingStarts(a.range, b.range))
.map(edit => ({ ...edit, text: edit.text && SnippetParser.escape(edit.text) }));
.sort((a, b) => Range.compareRangesUsingStarts(a.range, b.range));
this._editor.executeEdits('', this._edits);
}
}