summaryrefslogtreecommitdiff
path: root/helix-view/src
diff options
context:
space:
mode:
Diffstat (limited to 'helix-view/src')
-rw-r--r--helix-view/src/gutter.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/helix-view/src/gutter.rs b/helix-view/src/gutter.rs
index ab5c6d16..1ee84d43 100644
--- a/helix-view/src/gutter.rs
+++ b/helix-view/src/gutter.rs
@@ -109,10 +109,12 @@ pub fn breakpoints<'doc>(
let error = theme.get("error");
let info = theme.get("info");
- let breakpoints = doc
- .path()
- .and_then(|path| editor.breakpoints.get(path))
- .unwrap();
+ let breakpoints = doc.path().and_then(|path| editor.breakpoints.get(path));
+
+ let breakpoints = match breakpoints {
+ Some(breakpoints) => breakpoints,
+ None => return Box::new(move |_, _, _| None),
+ };
Box::new(move |line: usize, _selected: bool, out: &mut String| {
let breakpoint = breakpoints