=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/cmd-set-option.c,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- src/usr.bin/tmux/cmd-set-option.c 2011/01/04 01:58:12 1.45 +++ src/usr.bin/tmux/cmd-set-option.c 2011/01/04 02:03:41 1.46 @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-set-option.c,v 1.45 2011/01/04 01:58:12 nicm Exp $ */ +/* $OpenBSD: cmd-set-option.c,v 1.46 2011/01/04 02:03:41 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -68,6 +68,16 @@ cmd_set_option_exec }; +const struct cmd_entry cmd_set_window_option_entry = { + "set-window-option", "setw", + "agt:u", 1, 2, + "[-agu] " CMD_TARGET_WINDOW_USAGE " option [value]", + 0, + NULL, + NULL, + cmd_set_option_exec +}; + int cmd_set_option_exec(struct cmd *self, struct cmd_ctx *ctx) { @@ -87,7 +97,8 @@ if (args_has(self->args, 's')) { oo = &global_options; table = server_options_table; - } else if (args_has(self->args, 'w')) { + } else if (args_has(self->args, 'w') || + self->entry == &cmd_set_window_option_entry) { table = window_options_table; if (args_has(self->args, 'g')) oo = &global_w_options;