Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Commit

Permalink
editsToUse are deeper in LSP WorkspaceEdit response (#2647)
Browse files Browse the repository at this point in the history
Edits are actually stored in `changes` field in WorkspaceEdit; see:
https://github.com/Microsoft/language-server-protocol/blob/gh-pages/specification.md#workspaceedit

Resolves: #2646
  • Loading branch information
Siprj authored and akinsho committed Oct 24, 2018
1 parent 7431882 commit c4dd8ad
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions browser/src/Services/Workspace/Workspace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,9 @@ export class Workspace implements Oni.Workspace.Api {
}

public async applyEdits(edits: types.WorkspaceEdit): Promise<void> {
let editsToUse = edits
if (edits.documentChanges) {
editsToUse = convertTextDocumentChangesToFileMap(edits.documentChanges)
}
const editsToUse = edits.documentChanges
? convertTextDocumentChangesToFileMap(edits.documentChanges)
: edits.changes

const files = Object.keys(editsToUse)

Expand Down

0 comments on commit c4dd8ad

Please sign in to comment.