From 3fc501c99f8f8c539dc4714a200bac45a7169138 Mon Sep 17 00:00:00 2001
From: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Date: Sat, 21 Aug 2021 15:17:25 +0300
Subject: [PATCH] Correctly display 1-based breakpoints

---
 helix-term/src/ui/editor.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 75ad6a35..7f441a7d 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -475,7 +475,7 @@ impl EditorView {
             let selected = cursors.contains(&line);
 
             if let Some(bps) = breakpoints.as_ref() {
-                if bps.iter().any(|breakpoint| breakpoint.line == line) {
+                if bps.iter().any(|breakpoint| breakpoint.line - 1 == line) {
                     surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, warning);
                 }
             }
@@ -486,7 +486,7 @@ impl EditorView {
                         .path()
                         .map(|path| src.path == Some(path.clone()))
                         .unwrap_or(false)
-                        && sp.line == line
+                        && sp.line - 1 == line
                     {
                         surface.set_style(
                             Rect::new(viewport.x, viewport.y + i as u16, 6, 1),