From 7455c673e62d14314c7c45151f139d5f4e3e25e2 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Mon, 24 Nov 2025 22:51:46 +0100 Subject: Fix crashes when killing buffers Now, if you kill all buffers, the editor will shut down :) --- src/main/cmds.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/main/cmds.c') diff --git a/src/main/cmds.c b/src/main/cmds.c index 989f28e..a7b509d 100644 --- a/src/main/cmds.c +++ b/src/main/cmds.c @@ -334,7 +334,10 @@ int32_t buflist_refresh_cmd(struct command_ctx ctx, int argc, const char *argv[]) { (void)argc; (void)argv; - buflist_refresh(window_buffer(ctx.active_window), ctx.buffers); + struct buffer *b = buffers_find(ctx.buffers, "*buffers*"); + if (b != NULL) { + buflist_refresh(b, ctx.buffers); + } return 0; } -- cgit v1.2.3