degesch: fix log reopening after a buffer rename

This commit is contained in:
Přemysl Eric Janouch 2020-03-23 00:41:08 +01:00
parent 07d59db5ab
commit 6287e20919
Signed by: p
GPG Key ID: A0420B94F92B9493

View File

@ -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);
}