diff options
Diffstat (limited to 'cmd-next-window.c')
-rw-r--r-- | cmd-next-window.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/cmd-next-window.c b/cmd-next-window.c index 72c0f033..cbd74c20 100644 --- a/cmd-next-window.c +++ b/cmd-next-window.c @@ -1,4 +1,4 @@ -/* $Id: cmd-next-window.c,v 1.14 2009-01-18 18:31:45 nicm Exp $ */ +/* $Id: cmd-next-window.c,v 1.15 2009-01-19 18:23:40 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -25,7 +25,7 @@ */ void cmd_next_window_init(struct cmd *, int); -void cmd_next_window_exec(struct cmd *, struct cmd_ctx *); +int cmd_next_window_exec(struct cmd *, struct cmd_ctx *); const struct cmd_entry cmd_next_window_entry = { "next-window", "next", @@ -52,7 +52,7 @@ cmd_next_window_init(struct cmd *self, int key) data->flags |= CMD_AFLAG; } -void +int cmd_next_window_exec(struct cmd *self, struct cmd_ctx *ctx) { struct cmd_target_data *data = self->data; @@ -60,7 +60,7 @@ cmd_next_window_exec(struct cmd *self, struct cmd_ctx *ctx) int activity; if ((s = cmd_find_session(ctx, data->target)) == NULL) - return; + return (-1); activity = 0; if (data->flags & CMD_AFLAG) @@ -68,10 +68,11 @@ cmd_next_window_exec(struct cmd *self, struct cmd_ctx *ctx) if (session_next(s, activity) == 0) server_redraw_session(s); - else + else { ctx->error(ctx, "no next window"); + return (-1); + } recalculate_sizes(); - if (ctx->cmdclient != NULL) - server_write_client(ctx->cmdclient, MSG_EXIT, NULL, 0); + return (0); } |