@@ -25,7 +25,7 @@ use anyhow::{anyhow, bail};
25pub fn dap_pos_to_pos(doc: &helix_core::Rope, line: usize, column: usize) -> Option<usize> {
25pub fn dap_pos_to_pos(doc: &helix_core::Rope, line: usize, column: usize) -> Option<usize> {
26 // 1-indexing to 0 indexing
26 // 1-indexing to 0 indexing
27 let line = doc.try_line_to_char(line - 1).ok()?;
27 let line = doc.try_line_to_char(line - 1).ok()?;
28− let pos = line + column;
28+ let pos = line + column.saturating_sub(1);
29 // TODO: this is probably utf-16 offsets
29 // TODO: this is probably utf-16 offsets