mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:26:05 +00:00 
			
		
		
		
	Make it so using kill-pane to destroy the last pane in a window destroys the
window instead of being an error.
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user