Make utf8 default, implement utf16 in terms of it

This commit is contained in:
Aleksey Kladov
2021-02-12 22:09:53 +03:00
parent 00cc778c8c
commit 95209aa3f8
6 changed files with 28 additions and 11 deletions

View File

@@ -22,6 +22,7 @@ use crate::{
pub(crate) fn position(line_index: &LineIndex, offset: TextSize) -> lsp_types::Position {
let line_col = line_index.line_col(offset);
let line_col = line_index.to_utf16(line_col);
lsp_types::Position::new(line_col.line, line_col.col)
}