aboutsummaryrefslogtreecommitdiff
path: root/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'window.c')
-rw-r--r--window.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/window.c b/window.c
index d66cb1f6..eb0f8ac3 100644
--- a/window.c
+++ b/window.c
@@ -301,7 +301,7 @@ window_create1(u_int sx, u_int sy)
w->sx = sx;
w->sy = sy;
- options_init(&w->options, &global_w_options);
+ w->options = options_create(global_w_options);
w->references = 0;
@@ -334,7 +334,7 @@ window_create(const char *name, int argc, char **argv, const char *path,
w->active = TAILQ_FIRST(&w->panes);
if (name != NULL) {
w->name = xstrdup(name);
- options_set_number(&w->options, "automatic-rename", 0);
+ options_set_number(w->options, "automatic-rename", 0);
} else
w->name = default_window_name(w);
@@ -358,7 +358,7 @@ window_destroy(struct window *w)
if (event_initialized(&w->alerts_timer))
evtimer_del(&w->alerts_timer);
- options_free(&w->options);
+ options_free(w->options);
window_destroy_panes(w);
@@ -436,8 +436,8 @@ window_redraw_active_switch(struct window *w, struct window_pane *wp)
* active or inactive pane do not have a custom style, they will need
* to be redrawn.
*/
- agc = options_get_style(&w->options, "window-active-style");
- wgc = options_get_style(&w->options, "window-style");
+ agc = options_get_style(w->options, "window-active-style");
+ wgc = options_get_style(w->options, "window-style");
if (style_equal(agc, wgc))
return;
if (style_equal(&grid_default_cell, &w->active->colgc))
@@ -597,7 +597,7 @@ window_pane_at_index(struct window *w, u_int idx)
struct window_pane *wp;
u_int n;
- n = options_get_number(&w->options, "pane-base-index");
+ n = options_get_number(w->options, "pane-base-index");
TAILQ_FOREACH(wp, &w->panes, entry) {
if (n == idx)
return (wp);
@@ -635,7 +635,7 @@ window_pane_index(struct window_pane *wp, u_int *i)
struct window_pane *wq;
struct window *w = wp->window;
- *i = options_get_number(&w->options, "pane-base-index");
+ *i = options_get_number(w->options, "pane-base-index");
TAILQ_FOREACH(wq, &w->panes, entry) {
if (wp == wq) {
return (0);
@@ -861,7 +861,7 @@ window_pane_spawn(struct window_pane *wp, int argc, char **argv,
memcpy(tio2.c_cc, tio->c_cc, sizeof tio2.c_cc);
tio2.c_cc[VERASE] = '\177';
#ifdef IUTF8
- if (options_get_number(&wp->window->options, "utf8"))
+ if (options_get_number(wp->window->options, "utf8"))
tio2.c_iflag |= IUTF8;
#endif
if (tcsetattr(STDIN_FILENO, TCSANOW, &tio2) != 0)
@@ -1016,7 +1016,7 @@ window_pane_alternate_on(struct window_pane *wp, struct grid_cell *gc,
if (wp->saved_grid != NULL)
return;
- if (!options_get_number(&wp->window->options, "alternate-screen"))
+ if (!options_get_number(wp->window->options, "alternate-screen"))
return;
sx = screen_size_x(s);
sy = screen_size_y(s);
@@ -1046,7 +1046,7 @@ window_pane_alternate_off(struct window_pane *wp, struct grid_cell *gc,
if (wp->saved_grid == NULL)
return;
- if (!options_get_number(&wp->window->options, "alternate-screen"))
+ if (!options_get_number(wp->window->options, "alternate-screen"))
return;
sx = screen_size_x(s);
sy = screen_size_y(s);
@@ -1134,7 +1134,7 @@ window_pane_key(struct window_pane *wp, struct client *c, struct session *s,
if (KEYC_IS_MOUSE(key))
return;
- if (options_get_number(&wp->window->options, "synchronize-panes")) {
+ if (options_get_number(wp->window->options, "synchronize-panes")) {
TAILQ_FOREACH(wp2, &wp->window->panes, entry) {
if (wp2 == wp || wp2->mode != NULL)
continue;