version 1.126, 2019/06/20 07:41:29 |
version 1.127, 2019/06/20 11:59:59 |
|
|
.name = "set-option", |
.name = "set-option", |
.alias = "set", |
.alias = "set", |
|
|
.args = { "aFgoqst:uw", 1, 2 }, |
.args = { "aFgopqst:uw", 1, 2 }, |
.usage = "[-aFgosquw] [-t target-window] option [value]", |
.usage = "[-aFgopqsuw] " CMD_TARGET_PANE_USAGE " option [value]", |
|
|
.target = { 't', CMD_FIND_WINDOW, CMD_FIND_CANFAIL }, |
.target = { 't', CMD_FIND_PANE, CMD_FIND_CANFAIL }, |
|
|
.flags = CMD_AFTERHOOK, |
.flags = CMD_AFTERHOOK, |
.exec = cmd_set_option_exec |
.exec = cmd_set_option_exec |
|
|
struct session *s = fs->s; |
struct session *s = fs->s; |
struct winlink *wl = fs->wl; |
struct winlink *wl = fs->wl; |
struct window *w; |
struct window *w; |
enum options_table_scope scope; |
struct window_pane *wp; |
struct options *oo; |
struct options *oo; |
struct options_entry *parent, *o; |
struct options_entry *parent, *o; |
char *name, *argument, *value = NULL, *cause; |
char *name, *argument, *value = NULL, *cause; |
int window, idx, already, error, ambiguous; |
int window, idx, already, error, ambiguous; |
|
int scope; |
struct style *sy; |
struct style *sy; |
|
|
window = (self->entry == &cmd_set_window_option_entry); |
window = (self->entry == &cmd_set_window_option_entry); |
|
|
alerts_reset_all(); |
alerts_reset_all(); |
if (strcmp(name, "window-style") == 0 || |
if (strcmp(name, "window-style") == 0 || |
strcmp(name, "window-active-style") == 0) { |
strcmp(name, "window-active-style") == 0) { |
RB_FOREACH(w, windows, &windows) |
RB_FOREACH(wp, window_pane_tree, &all_window_panes) |
w->flags |= WINDOW_STYLECHANGED; |
wp->flags |= PANE_STYLECHANGED; |
} |
} |
if (strcmp(name, "pane-border-status") == 0) { |
if (strcmp(name, "pane-border-status") == 0) { |
RB_FOREACH(w, windows, &windows) |
RB_FOREACH(w, windows, &windows) |