summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2020-03-23 00:41:08 +0100
committerPřemysl Janouch <p@janouch.name>2020-03-23 00:41:08 +0100
commit6287e20919b30b566de89a05863f74e9a882a98b (patch)
tree40921cf07b1c3eecaed8e1c2ada00cdfdf41dffc
parent07d59db5abe319e27542aff9031fcc2f6ca362d4 (diff)
downloadxK-6287e20919b30b566de89a05863f74e9a882a98b.tar.gz
xK-6287e20919b30b566de89a05863f74e9a882a98b.tar.xz
xK-6287e20919b30b566de89a05863f74e9a882a98b.zip
degesch: fix log reopening after a buffer rename
-rw-r--r--degesch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/degesch.c b/degesch.c
index 9d31b5c..5e70397 100644
--- a/degesch.c
+++ b/degesch.c
@@ -4235,11 +4235,11 @@ buffer_rename (struct app_context *ctx,
str_map_set (&ctx->buffers_by_name, buffer->name, NULL);
str_map_set (&ctx->buffers_by_name, new_name, buffer);
+ cstr_set (&buffer->name, xstrdup (new_name));
+
buffer_close_log_file (buffer);
buffer_open_log_file (ctx, buffer);
- cstr_set (&buffer->name, xstrdup (new_name));
-
// We might have renamed the current buffer
refresh_prompt (ctx);
}