int
cmd_set_window_option_exec(struct cmd *self, struct cmd_ctx *ctx)
{
	struct cmd_target_data		*data = self->data;

	cmd_set_flag(&data->chflags, 'w');
	return (cmd_set_option_entry.exec(self, ctx));
}
示例#2
0
/* If this option is expected, set it in chflags, otherwise return -1. */
int
cmd_parse_flags(int opt, const char *chflagstr, uint64_t *chflags)
{
	if (strchr(chflagstr, opt) == NULL)
		return (-1);
	cmd_set_flag(chflags, opt);
	return (0);
}
void
cmd_select_pane_init(struct cmd *self, int key)
{
	struct cmd_target_data	*data;

	cmd_target_init(self, key);
	data = self->data;

	if (key == KEYC_UP)
		cmd_set_flag(&data->chflags, 'U');
	if (key == KEYC_DOWN)
		cmd_set_flag(&data->chflags, 'D');
	if (key == KEYC_LEFT)
		cmd_set_flag(&data->chflags, 'L');
	if (key == KEYC_RIGHT)
		cmd_set_flag(&data->chflags, 'R');
	if (key == 'o')
		data->target = xstrdup(":.+");
}
void
cmd_previous_window_init(struct cmd *self, int key)
{
	struct cmd_target_data	*data;

	cmd_target_init(self, key);
	data = self->data;

	if (key == ('p' | KEYC_ESCAPE))
		cmd_set_flag(&data->chflags, 'a');
}
示例#5
0
void
cmd_copy_mode_init(struct cmd *self, int key)
{
	struct cmd_target_data	*data;

	cmd_target_init(self, key);
	data = self->data;

	switch (key) {
	case KEYC_PPAGE:
		cmd_set_flag(&data->chflags, 'u');
		break;
	}
}