@@ -155,3 +155,19 @@ pub fn breakpoints<'doc>(
155155 Some(style)
156156 })
157157}
158+
159+pub fn diagnostics_or_breakpoints<'doc>(
160+ editor: &'doc Editor,
161+ doc: &'doc Document,
162+ view: &View,
163+ theme: &Theme,
164+ is_focused: bool,
165+ width: usize,
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);
169+
170+ Box::new(move |line, selected, out| {
171+ breakpoints(line, selected, out).or_else(|| diagnostics(line, selected, out))
172+ })
173+}