Extract and lift constant

This commit is contained in:
Matt Bierner
2019-02-26 16:15:10 -08:00
parent 29acd11312
commit 1cb65ce8e5

View File

@@ -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);
}