diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2009-07-17 20:37:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2009-07-17 20:37:03 +0000 |
commit | 0ca6f667e3e6f26e92db01ee2a769d0ba49509ca (patch) | |
tree | f9538add19095eefbcfb7aaaf4569e1cdfdb1491 /cmd-kill-pane.c | |
parent | 6f5150a943425d7d5d65ae443f956931fcb82d0b (diff) |
Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.
Diffstat (limited to 'cmd-kill-pane.c')
-rw-r--r-- | cmd-kill-pane.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd-kill-pane.c b/cmd-kill-pane.c index d3a54c92..b501e416 100644 --- a/cmd-kill-pane.c +++ b/cmd-kill-pane.c @@ -61,8 +61,9 @@ cmd_kill_pane_exec(struct cmd *self, struct cmd_ctx *ctx) } if (window_count_panes(wl->window) == 1) { - ctx->error(ctx, "can't kill pane: %d", data->pane); - return (-1); + /* Only one pane, kill the window. */ + server_kill_window(wl->window); + return (0); } window_remove_pane(wl->window, wp); |