summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-set-option.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2019-06-20 11:59:59 +0000
committernicm <nicm@openbsd.org>2019-06-20 11:59:59 +0000
commit6e0f28f868d9cdb38e53237c697fe7731f7e850d (patch)
tree5517a20c5217760c5932640f711cc28bf95a6ea7 /usr.bin/tmux/cmd-set-option.c
parentTell a bit about automatic mode; ok jmc@ (diff)
downloadwireguard-openbsd-6e0f28f868d9cdb38e53237c697fe7731f7e850d.tar.xz
wireguard-openbsd-6e0f28f868d9cdb38e53237c697fe7731f7e850d.zip
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 'usr.bin/tmux/cmd-set-option.c')
-rw-r--r--usr.bin/tmux/cmd-set-option.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c
index e2add379f82..55691d015d1 100644
--- a/usr.bin/tmux/cmd-set-option.c
+++ b/usr.bin/tmux/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-option.c,v 1.126 2019/06/20 07:41:29 nicm Exp $ */
+/* $OpenBSD: cmd-set-option.c,v 1.127 2019/06/20 11:59:59 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -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)