diff options
author | Blaž Hrastnik | 2021-03-15 07:19:31 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-03-15 07:19:31 +0000 |
commit | 87e3cd3df283a6da055488bbea60637713bd1f35 (patch) | |
tree | 94fc1d72a136d4ccadc927ea19f95cac370eb61c /helix-lsp | |
parent | 1abf2953cdee525f8c1f30e881bc5c4211cb62fd (diff) |
ui: Render diagnostic errors in sideline.
Diffstat (limited to 'helix-lsp')
-rw-r--r-- | helix-lsp/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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); |