From 5d3c69d5650d4e23eb9922e64bfe31ecdb9feacc Mon Sep 17 00:00:00 2001 From: Dmitry Sharshakov Date: Tue, 24 Aug 2021 08:47:20 +0300 Subject: Support logpoints Tested with Node (Delve and LLDB do not support logpoints) --- helix-term/src/ui/editor.rs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'helix-term/src/ui') diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index bbac3f3f..272c8ac1 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -476,6 +476,8 @@ impl EditorView { { if breakpoint.condition.is_some() { surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, error); + } else if breakpoint.log_message.is_some() { + surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, info); } else { surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, warning); } @@ -581,6 +583,12 @@ impl EditorView { .lines, ); } + if let Some(log_message) = &breakpoint.log_message { + lines.extend( + Text::styled(log_message, info.add_modifier(Modifier::UNDERLINED)) + .lines, + ); + } } } } -- cgit v1.2.3-70-g09d2