on master help sign in
Correctly display 1-based breakpoints
3fc501cDmitry Sharshakov
helix-term/src/ui/editor.rs+2−2
@@ -475,7 +475,7 @@ impl EditorView {
475 let selected = cursors.contains(&line);
475 let selected = cursors.contains(&line);
476
476
477 if let Some(bps) = breakpoints.as_ref() {
477 if let Some(bps) = breakpoints.as_ref() {
478− if bps.iter().any(|breakpoint| breakpoint.line == line) {
478+ if bps.iter().any(|breakpoint| breakpoint.line - 1 == line) {
479 surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, warning);
479 surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, warning);
480 }
480 }
481 }
481 }
@@ -486,7 +486,7 @@ impl EditorView {
486 .path()
486 .path()
487 .map(|path| src.path == Some(path.clone()))
487 .map(|path| src.path == Some(path.clone()))
488 .unwrap_or(false)
488 .unwrap_or(false)
489− && sp.line == line
489+ && sp.line - 1 == line
490 {
490 {
491 surface.set_style(
491 surface.set_style(
492 Rect::new(viewport.x, viewport.y + i as u16, 6, 1),
492 Rect::new(viewport.x, viewport.y + i as u16, 6, 1),