diff options
| author | Albert Cervin <albert@acervin.com> | 2025-11-24 22:51:46 +0100 |
|---|---|---|
| committer | Albert Cervin <albert@acervin.com> | 2025-11-24 22:51:46 +0100 |
| commit | 7455c673e62d14314c7c45151f139d5f4e3e25e2 (patch) | |
| tree | 2a820ea5c408a16082dc34460bbd76b23391acfa /src/main/cmds.c | |
| parent | fb91c582ad5b552f3ed081fb2737d682a7cad181 (diff) | |
| download | dged-7455c673e62d14314c7c45151f139d5f4e3e25e2.tar.gz dged-7455c673e62d14314c7c45151f139d5f4e3e25e2.tar.xz dged-7455c673e62d14314c7c45151f139d5f4e3e25e2.zip | |
Fix crashes when killing buffers
Now, if you kill all buffers, the editor will shut down :)
Diffstat (limited to 'src/main/cmds.c')
| -rw-r--r-- | src/main/cmds.c | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |
