aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Sharshakov2021-09-05 05:51:33 +0000
committerDmitry Sharshakov2021-09-05 05:51:33 +0000
commit0e1e4edc5ee987f8037d6e73d6da2196773dc234 (patch)
tree26b884970d3729bd11236d92dcaa4fc2a6825e66
parent8a609047c3e0d9586038b04cebb288d62db57a18 (diff)
different display for conditional logpoints
-rw-r--r--helix-term/src/ui/editor.rs20
1 files changed, 12 insertions, 8 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index b6757ca0..e151611a 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -503,13 +503,16 @@ impl EditorView {
if let Some(bps) = breakpoints.as_ref() {
if let Some(breakpoint) = bps.iter().find(|breakpoint| breakpoint.line - 1 == line)
{
- let style = if breakpoint.condition.is_some() {
- error
- } else if breakpoint.log_message.is_some() {
- info
- } else {
- warning
- };
+ let style =
+ if breakpoint.condition.is_some() && breakpoint.log_message.is_some() {
+ error.add_modifier(Modifier::CROSSED_OUT)
+ } else if breakpoint.condition.is_some() {
+ error
+ } else if breakpoint.log_message.is_some() {
+ info
+ } else {
+ warning
+ };
surface.set_stringn(viewport.x, viewport.y + i as u16, "▲", 1, style);
}
}
@@ -607,7 +610,8 @@ impl EditorView {
{
if let Some(condition) = &breakpoint.condition {
lines.extend(
- Text::styled(condition, info.add_modifier(Modifier::UNDERLINED)).lines,
+ Text::styled(condition, warning.add_modifier(Modifier::UNDERLINED))
+ .lines,
);
}
if let Some(log_message) = &breakpoint.log_message {