mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 01:29:04 +01:00
Extract and lift constant
This commit is contained in:
@@ -71,8 +71,9 @@ export namespace WorkspaceEdit {
|
||||
edits: Iterable<Proto.FileCodeEdits>
|
||||
): vscode.WorkspaceEdit {
|
||||
for (const edit of edits) {
|
||||
const resource = client.toResource(edit.fileName);
|
||||
for (const textChange of edit.textChanges) {
|
||||
workspaceEdit.replace(client.toResource(edit.fileName),
|
||||
workspaceEdit.replace(resource,
|
||||
Range.fromTextSpan(textChange),
|
||||
textChange.newText);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user