summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--degesch.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/degesch.c b/degesch.c
index 03244f4..cdfb6f7 100644
--- a/degesch.c
+++ b/degesch.c
@@ -2921,8 +2921,8 @@ log_formatter (struct app_context *ctx,
bool unseen_pm = buffer->type == BUFFER_PM
&& buffer != ctx->current_buffer
&& !(flags & BUFFER_LINE_UNIMPORTANT);
- if (ctx->beep_on_highlight
- && ((flags & BUFFER_LINE_HIGHLIGHT) || unseen_pm))
+ bool important = (flags & BUFFER_LINE_HIGHLIGHT) || unseen_pm;
+ if (ctx->beep_on_highlight && important)
input_ding (&ctx->input);
bool can_leak = false;
@@ -2949,8 +2949,7 @@ log_formatter (struct app_context *ctx,
buffer->unseen_messages_count++;
if (flags & BUFFER_LINE_UNIMPORTANT)
buffer->unseen_unimportant_count++;
- if (flags & BUFFER_LINE_HIGHLIGHT)
- buffer->highlighted = true;
+ buffer->highlighted = important;
refresh_prompt (ctx);
}