@@ -155,3 +155,19 @@ pub fn breakpoints<'doc>(
155 Some(style)
155 Some(style)
159+pub fn diagnostics_or_breakpoints<'doc>(
160+ editor: &'doc Editor,
161+ doc: &'doc Document,
166+) -> GutterFn<'doc> {
167+ let diagnostics = diagnostic(editor, doc, view, theme, is_focused, width);
168+ let breakpoints = breakpoints(editor, doc, view, theme, is_focused, width);
170+ Box::new(move |line, selected, out| {
171+ breakpoints(line, selected, out).or_else(|| diagnostics(line, selected, out))