aboutsummaryrefslogtreecommitdiff
path: root/helix-lsp/src
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-15 07:19:31 +0000
committerBlaž Hrastnik2021-03-15 07:19:31 +0000
commit87e3cd3df283a6da055488bbea60637713bd1f35 (patch)
tree94fc1d72a136d4ccadc927ea19f95cac370eb61c /helix-lsp/src
parent1abf2953cdee525f8c1f30e881bc5c4211cb62fd (diff)
ui: Render diagnostic errors in sideline.
Diffstat (limited to 'helix-lsp/src')
-rw-r--r--helix-lsp/src/lib.rs2
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);