Skip to content

Commit

Permalink
Upgrade languageserver-types.
Browse files Browse the repository at this point in the history
Close #217.
Close #238.
  • Loading branch information
autozimu committed Jan 1, 2018
1 parent da344a5 commit 5e87609
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions src/languageclient.rs
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,16 @@ impl ILanguageClient for Arc<Mutex<State>> {
debug!("Begin apply WorkspaceEdit: {:?}", edit);
let (filename, line, character): (String, u64, u64) =
self.gather_args(&[VimVar::Filename, VimVar::Line, VimVar::Character], &None)?;
for (uri, edits) in &edit.changes {
self.apply_TextEdits(uri.path(), edits.as_slice())?;

if let Some(ref changes) = edit.document_changes {
for e in changes {
self.apply_TextEdits(e.text_document.uri.path(), &e.edits)?;
}
}
if let Some(ref changes) = edit.changes {
for (uri, edits) in changes {
self.apply_TextEdits(uri.path(), edits)?;
}
}
debug!("End apply WorkspaceEdit");
self.goto_location(&filename, line, character)?;
Expand Down

0 comments on commit 5e87609

Please sign in to comment.