on master help sign in
Correctly display 1-based breakpoints
commit3fc501c99f8f8c539dc4714a200bac45a7169138 authorDmitry Sharshakov <d3dx12.xx@gmail.com> dateSat 21 Aug 2021, 15:17 (5 years ago) parent7087558
1 file changed+2−2
helix-term/src/ui/editor.rs+2−2
helix-term/src/ui/editor.rs+2−2
@@ -475,7 +475,7 @@ impl EditorView {
475475 let selected = cursors.contains(&line);
476476
477477 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) {
479479 surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, warning);
480480 }
481481 }
@@ -486,7 +486,7 @@ impl EditorView {
486486 .path()
487487 .map(|path| src.path == Some(path.clone()))
488488 .unwrap_or(false)
489− && sp.line == line
489+ && sp.line - 1 == line
490490 {
491491 surface.set_style(
492492 Rect::new(viewport.x, viewport.y + i as u16, 6, 1),