aboutsummaryrefslogtreecommitdiff
path: root/degesch.c
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-10-30 23:49:43 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2015-10-30 23:49:43 +0100
commitfe88e30bf58c7892e1d9591c7ffcfe73e3e41657 (patch)
treec7863d8864adba829500d1fa7d45b281bee63f0f /degesch.c
parenta8a852d4b3dbe39bc6ea455b8fa758f843d17541 (diff)
downloadxK-fe88e30bf58c7892e1d9591c7ffcfe73e3e41657.tar.gz
xK-fe88e30bf58c7892e1d9591c7ffcfe73e3e41657.tar.xz
xK-fe88e30bf58c7892e1d9591c7ffcfe73e3e41657.zip
degesch: fix beeping on "unimportant" PM events
Which in practice means stop beeping on quits in PM buffers.
Diffstat (limited to 'degesch.c')
-rw-r--r--degesch.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/degesch.c b/degesch.c
index 694e79f..543601e 100644
--- a/degesch.c
+++ b/degesch.c
@@ -2916,10 +2916,12 @@ log_formatter (struct app_context *ctx,
if (buffer->log_file)
buffer_line_write_to_log (ctx, line, buffer->log_file);
- if (ctx->beep_on_highlight)
- if ((flags & BUFFER_LINE_HIGHLIGHT)
- || (buffer->type == BUFFER_PM && buffer != ctx->current_buffer))
- input_ding (&ctx->input);
+ 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))
+ input_ding (&ctx->input);
bool can_leak = false;
if ((buffer == ctx->global_buffer)