aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-11-15 01:43:00 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-11-15 01:43:00 +0100
commit6c7a2ce3c8346ff4da085e560caf73687c7c2a3b (patch)
tree52312b08408b46acdb91afc85a4bc3311038a897
parent153d8c55d94146b83e06859f583a69f8ecfb5aba (diff)
downloadxK-6c7a2ce3c8346ff4da085e560caf73687c7c2a3b.tar.gz
xK-6c7a2ce3c8346ff4da085e560caf73687c7c2a3b.tar.xz
xK-6c7a2ce3c8346ff4da085e560caf73687c7c2a3b.zip
degesch: unseen PMs show up as highlights
I used to miss them.
-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);
}