diff options
author | Aleksey Kladov <[email protected]> | 2021-02-12 19:09:53 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-02-16 16:17:32 +0000 |
commit | 95209aa3f8e4b149da6adb374611ece76c2b82ca (patch) | |
tree | 37e5b2aa72b597586f27c5200d25abb349d6c11f /crates/rust-analyzer/src/to_proto.rs | |
parent | 00cc778c8c62e8f68531c1cadcce8b05b7287d84 (diff) |
Make utf8 default, implement utf16 in terms of it
Diffstat (limited to 'crates/rust-analyzer/src/to_proto.rs')
-rw-r--r-- | crates/rust-analyzer/src/to_proto.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/rust-analyzer/src/to_proto.rs b/crates/rust-analyzer/src/to_proto.rs index 599b5207c..ec5e8aa73 100644 --- a/crates/rust-analyzer/src/to_proto.rs +++ b/crates/rust-analyzer/src/to_proto.rs | |||
@@ -22,6 +22,7 @@ use crate::{ | |||
22 | 22 | ||
23 | pub(crate) fn position(line_index: &LineIndex, offset: TextSize) -> lsp_types::Position { | 23 | pub(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 | let line_col = line_index.to_utf16(line_col); | ||
25 | lsp_types::Position::new(line_col.line, line_col.col) | 26 | lsp_types::Position::new(line_col.line, line_col.col) |
26 | } | 27 | } |
27 | 28 | ||