aboutsummaryrefslogtreecommitdiff
path: root/crates/rust-analyzer/src/to_proto.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-02-12 18:24:10 +0000
committerAleksey Kladov <[email protected]>2021-02-16 16:17:32 +0000
commit2cb4ac9eb4cb02e7d14ec50a9e7d8e9fe49a4ec1 (patch)
treed70cb9c9c61359ba0b171e3e38267e42bcb00b0b /crates/rust-analyzer/src/to_proto.rs
parentcc49502ab47bcd20c90589226282b8f3c3df5190 (diff)
Prepare for utf-8 offsets
Diffstat (limited to 'crates/rust-analyzer/src/to_proto.rs')
-rw-r--r--crates/rust-analyzer/src/to_proto.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs
index 8a2b4d9bd..599b5207c 100644
--- a/crates/rust-analyzer/src/to_proto.rs
+++ b/crates/rust-analyzer/src/to_proto.rs
@@ -22,7 +22,7 @@ use crate::{
22 22
23pub(crate) fn position(line_index: &LineIndex, offset: TextSize) -> lsp_types::Position { 23pub(crate) fn position(line_index: &LineIndex, offset: TextSize) -> lsp_types::Position {
24 let line_col = line_index.line_col(offset); 24 let line_col = line_index.line_col(offset);
25 lsp_types::Position::new(line_col.line, line_col.col_utf16) 25 lsp_types::Position::new(line_col.line, line_col.col)
26} 26}
27 27
28pub(crate) fn range(line_index: &LineIndex, range: TextRange) -> lsp_types::Range { 28pub(crate) fn range(line_index: &LineIndex, range: TextRange) -> lsp_types::Range {