diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-18 11:07:14 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-07-18 11:07:14 +0000 |
commit | 19cb1fb592527e1800d6ae6f761b2a8ab944ef5d (patch) | |
tree | 24ab810190090efe17f7357099331f99d0a3c527 /cmd-kill-pane.c | |
parent | c30fbd1d8d2c3e0b85678db8de8204189f9a67f8 (diff) | |
download | rtmux-19cb1fb592527e1800d6ae6f761b2a8ab944ef5d.tar.gz rtmux-19cb1fb592527e1800d6ae6f761b2a8ab944ef5d.tar.bz2 rtmux-19cb1fb592527e1800d6ae6f761b2a8ab944ef5d.zip |
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 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd-kill-pane.c b/cmd-kill-pane.c index 79ea24a6..e796d78d 100644 --- a/cmd-kill-pane.c +++ b/cmd-kill-pane.c @@ -1,4 +1,4 @@ -/* $Id: cmd-kill-pane.c,v 1.8 2009-07-14 06:43:32 nicm Exp $ */ +/* $Id: cmd-kill-pane.c,v 1.9 2009-07-18 11:07:14 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -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); |