aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2015-06-28 20:56:45 +0200
committerPřemysl Janouch <p.janouch@gmail.com>2015-06-28 20:56:45 +0200
commitb5d472f0df391c633f16774fd178b3803df764f6 (patch)
tree703f3e0a361444a058d99c1cf87ff34ca2de851e
parent0074b1eda9a3e1c39eb9a3523fb7102279a63db6 (diff)
downloadxK-b5d472f0df391c633f16774fd178b3803df764f6.tar.gz
xK-b5d472f0df391c633f16774fd178b3803df764f6.tar.xz
xK-b5d472f0df391c633f16774fd178b3803df764f6.zip
degesch: clean up log_formatter()
-rw-r--r--degesch.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/degesch.c b/degesch.c
index 898228d..cbb20d3 100644
--- a/degesch.c
+++ b/degesch.c
@@ -2473,7 +2473,7 @@ log_formatter (struct app_context *ctx,
line->flags = flags;
line->when = time (NULL);
- // Move the formater inside
+ // Move the formatter inside
line->formatter = xmalloc (sizeof *line->formatter);
*line->formatter = *f;
@@ -2485,12 +2485,6 @@ log_formatter (struct app_context *ctx,
|| (buffer->type == BUFFER_PM && buffer != ctx->current_buffer))
input_ding (&ctx->input);
- if (buffer == ctx->current_buffer)
- {
- buffer_line_display (ctx, line, false);
- return;
- }
-
bool can_leak = false;
if ((buffer == ctx->global_buffer)
|| (ctx->current_buffer->type == BUFFER_GLOBAL
@@ -2499,7 +2493,9 @@ log_formatter (struct app_context *ctx,
&& buffer == ctx->current_buffer->server->buffer))
can_leak = true;
- if (!ctx->isolate_buffers && can_leak)
+ if (buffer == ctx->current_buffer)
+ buffer_line_display (ctx, line, false);
+ else if (!ctx->isolate_buffers && can_leak)
buffer_line_display (ctx, line, true);
else
{