From 6c7a2ce3c8346ff4da085e560caf73687c7c2a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Sun, 15 Nov 2015 01:43:00 +0100 Subject: [PATCH] degesch: unseen PMs show up as highlights I used to miss them. --- degesch.c | 7 +++---- 1 file 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); }