From bda1239a335f76e065e23ee3878bb20f5843e112 Mon Sep 17 00:00:00 2001
From: Přemysl Janouch
Date: Sat, 4 Jul 2015 20:04:20 +0200
Subject: degesch: /buffer close switches to previous buffer
buffer_next() proved too annoying.
---
degesch.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/degesch.c b/degesch.c
index 2485170..19eb68b 100644
--- a/degesch.c
+++ b/degesch.c
@@ -6404,7 +6404,9 @@ handle_buffer_close (struct app_context *ctx, struct handler_args *a)
irc_send (buffer->server, "PART %s", buffer->channel->name);
if (buffer == ctx->current_buffer)
- buffer_activate (ctx, buffer_next (ctx, 1));
+ buffer_activate (ctx, ctx->last_buffer
+ ? ctx->last_buffer
+ : buffer_next (ctx, 1));
buffer_remove (ctx, buffer);
}
}
--
cgit v1.2.3-70-g09d2