diff options
author | Adolfo OchagavĂa <[email protected]> | 2018-11-15 16:34:05 +0000 |
---|---|---|
committer | Adolfo OchagavĂa <[email protected]> | 2018-11-16 11:15:50 +0000 |
commit | 136d1864bcb5046e7f334ac347a8a94946d1ba90 (patch) | |
tree | 94be94eff9265d0e41cb847be2190e35416eb0a3 /crates/ra_lsp_server | |
parent | 9aebd9e6caf49467ca20caf2583c47cf5092c788 (diff) |
Support UTF-16 chars in LineIndex
Diffstat (limited to 'crates/ra_lsp_server')
-rw-r--r-- | crates/ra_lsp_server/src/conv.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/crates/ra_lsp_server/src/conv.rs b/crates/ra_lsp_server/src/conv.rs index e5a2449c2..a102b9105 100644 --- a/crates/ra_lsp_server/src/conv.rs +++ b/crates/ra_lsp_server/src/conv.rs | |||
@@ -49,7 +49,6 @@ impl ConvWith for Position { | |||
49 | type Output = TextUnit; | 49 | type Output = TextUnit; |
50 | 50 | ||
51 | fn conv_with(self, line_index: &LineIndex) -> TextUnit { | 51 | fn conv_with(self, line_index: &LineIndex) -> TextUnit { |
52 | // TODO: UTF-16 | ||
53 | let line_col = LineCol { | 52 | let line_col = LineCol { |
54 | line: self.line as u32, | 53 | line: self.line as u32, |
55 | col: (self.character as u32).into(), | 54 | col: (self.character as u32).into(), |
@@ -64,7 +63,6 @@ impl ConvWith for TextUnit { | |||
64 | 63 | ||
65 | fn conv_with(self, line_index: &LineIndex) -> Position { | 64 | fn conv_with(self, line_index: &LineIndex) -> Position { |
66 | let line_col = line_index.line_col(self); | 65 | let line_col = line_index.line_col(self); |
67 | // TODO: UTF-16 | ||
68 | Position::new(u64::from(line_col.line), u64::from(u32::from(line_col.col))) | 66 | Position::new(u64::from(line_col.line), u64::from(u32::from(line_col.col))) |
69 | } | 67 | } |
70 | } | 68 | } |