summaryrefslogtreecommitdiffstats
path: root/cmd-set-option.c
diff options
context:
space:
mode:
authornicm <nicm>2019-06-20 11:59:59 +0000
committernicm <nicm>2019-06-20 11:59:59 +0000
commit5f92f92908b81b4ec66682adb84b9ffc8d83c2f7 (patch)
tree1efeb76d391658d00d7b6028ae02b2cf49a5cac6 /cmd-set-option.c
parentc1ede507d954b98a73c40665e7aee6fe5f0c5bce (diff)
Add a per-pane option set. Pane options inherit from window options (so
there should be no change to existing behaviour) and are set and shown with set-option -p and show-options -p. Change remain-on-exit and window-style/window-active-style to be pane options (some others will be changed later). This makes select-pane -P and -g unnecessary so no longer document them (they still work) and no longer document set-window-option and show-window-options in favour of set-option -w and show-options -w.
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r--cmd-set-option.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c
index 10b70304..23b45230 100644
--- a/cmd-set-option.c
+++ b/cmd-set-option.c
@@ -43,10 +43,10 @@ const struct cmd_entry cmd_set_option_entry = {
.name = "set-option",
.alias = "set",
- .args = { "aFgoqst:uw", 1, 2 },
- .usage = "[-aFgosquw] [-t target-window] option [value]",
+ .args = { "aFgopqst:uw", 1, 2 },
+ .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,
.exec = cmd_set_option_exec
@@ -88,11 +88,12 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item)
struct session *s = fs->s;
struct winlink *wl = fs->wl;
struct window *w;
- enum options_table_scope scope;
+ struct window_pane *wp;
struct options *oo;
struct options_entry *parent, *o;
char *name, *argument, *value = NULL, *cause;
int window, idx, already, error, ambiguous;
+ int scope;
struct style *sy;
window = (self->entry == &cmd_set_window_option_entry);
@@ -249,8 +250,8 @@ cmd_set_option_exec(struct cmd *self, struct cmdq_item *item)
alerts_reset_all();
if (strcmp(name, "window-style") == 0 ||
strcmp(name, "window-active-style") == 0) {
- RB_FOREACH(w, windows, &windows)
- w->flags |= WINDOW_STYLECHANGED;
+ RB_FOREACH(wp, window_pane_tree, &all_window_panes)
+ wp->flags |= PANE_STYLECHANGED;
}
if (strcmp(name, "pane-border-status") == 0) {
RB_FOREACH(w, windows, &windows)