diff options
author | Jonas Schievink <[email protected]> | 2021-04-13 19:32:45 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-04-13 23:03:04 +0100 |
commit | 30aae2cefb9d068055ca8d250d04a288e3684394 (patch) | |
tree | 081a70d030c79437074e2d5ba15f7a9efd5d01cf /crates/rust-analyzer/src/to_proto.rs | |
parent | 10a243ea55565a0dd1de52f8f802c3e3a7bfef54 (diff) |
Move cursor position when using item movers
Diffstat (limited to 'crates/rust-analyzer/src/to_proto.rs')
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 8d7cb9b74..1a1f65f3b 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -688,18 +688,6 @@ pub(crate) fn goto_definition_response( | |||
688 | } | 688 | } |
689 | } | 689 | } |
690 | 690 | ||
691 | pub(crate) fn text_document_edit( | ||
692 | snap: &GlobalStateSnapshot, | ||
693 | file_id: FileId, | ||
694 | edit: TextEdit, | ||
695 | ) -> Result<lsp_types::TextDocumentEdit> { | ||
696 | let text_document = optional_versioned_text_document_identifier(snap, file_id); | ||
697 | let line_index = snap.file_line_index(file_id)?; | ||
698 | let edits = | ||
699 | edit.into_iter().map(|it| lsp_types::OneOf::Left(text_edit(&line_index, it))).collect(); | ||
700 | Ok(lsp_types::TextDocumentEdit { text_document, edits }) | ||
701 | } | ||
702 | |||
703 | pub(crate) fn snippet_text_document_edit( | 691 | pub(crate) fn snippet_text_document_edit( |
704 | snap: &GlobalStateSnapshot, | 692 | snap: &GlobalStateSnapshot, |
705 | is_snippet: bool, | 693 | is_snippet: bool, |