Skip to content

Commit

Permalink
don't escape text edits as snippets
Browse files Browse the repository at this point in the history
fixes #152746
  • Loading branch information
jrieken committed Jun 21, 2022
1 parent e52d6c4 commit f7311af
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/vs/workbench/contrib/bulkEdit/browser/bulkTextEdits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ import { ResourceMap } from 'vs/base/common/map';
import { IModelService } from 'vs/editor/common/services/model';
import { ResourceTextEdit } from 'vs/editor/browser/services/bulkEditService';
import { CancellationToken } from 'vs/base/common/cancellation';
import { SnippetParser } from 'vs/editor/contrib/snippet/browser/snippetParser';
import { performSnippetEdits } from 'vs/editor/contrib/snippet/browser/snippetController2';

type ValidationResult = { canApply: true } | { canApply: false; reason: URI };
Expand Down Expand Up @@ -94,8 +93,7 @@ class ModelEditTask implements IDisposable {
apply(): void {
if (this._edits.length > 0) {
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.model.pushEditOperations(null, this._edits, () => null);
}
if (this._newEol !== undefined) {
Expand Down

0 comments on commit f7311af

Please sign in to comment.