aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-08-21 12:17:25 +0000
committerDmitry Sharshakov2021-08-21 12:17:25 +0000
commit3fc501c99f8f8c539dc4714a200bac45a7169138 (patch)
tree6bb10fdbed8b4a15e0fd42166c9c8ea6807d5d74 /helix-term/src/ui
parent7087558918bfcc7dfbfaf55d13104e830660a165 (diff)
Correctly display 1-based breakpoints
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs4
1 files 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),