From 87e3cd3df283a6da055488bbea60637713bd1f35 Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Mon, 15 Mar 2021 16:19:31 +0900 Subject: ui: Render diagnostic errors in sideline. --- helix-lsp/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'helix-lsp') diff --git a/helix-lsp/src/lib.rs b/helix-lsp/src/lib.rs index 0d04b711..3e4f55ea 100644 --- a/helix-lsp/src/lib.rs +++ b/helix-lsp/src/lib.rs @@ -35,7 +35,7 @@ pub mod util { pub fn lsp_pos_to_pos(doc: RopeSlice, pos: lsp::Position) -> usize { let line = doc.line_to_char(pos.line as usize); let line_start = doc.char_to_utf16_cu(line); - doc.utf16_cu_to_char(pos.character as usize + line_start) + doc.utf16_cu_to_char(line_start + pos.character as usize) } pub fn pos_to_lsp_pos(doc: RopeSlice, pos: usize) -> lsp::Position { let line = doc.char_to_line(pos); -- cgit v1.2.3-70-g09d2