summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/options.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2021-11-01 09:34:50 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2021-11-01 09:34:50 +0000
commit515a879e380267e8941d7a95ae1978657f8c00fd (patch)
treed30eb095b57bfa3cf0996fafe44a7c6194758d34 /usr.bin/tmux/options.c
parent16f59bbd5f0faff049d7393bf5ee4b5e3bb9326b (diff)
Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue
2959.
Diffstat (limited to 'usr.bin/tmux/options.c')
-rw-r--r--usr.bin/tmux/options.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/tmux/options.c b/usr.bin/tmux/options.c
index 10bb1f3cb89..a4af7cdc76a 100644
--- a/usr.bin/tmux/options.c
+++ b/usr.bin/tmux/options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: options.c,v 1.65 2021/10/14 13:19:01 nicm Exp $ */
+/* $OpenBSD: options.c,v 1.66 2021/11/01 09:34:49 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -1106,15 +1106,22 @@ options_push_changes(const char *name)
struct session *s;
struct window *w;
struct window_pane *wp;
+ int c;
if (strcmp(name, "automatic-rename") == 0) {
RB_FOREACH(w, windows, &windows) {
if (w->active == NULL)
continue;
- if (options_get_number(w->options, "automatic-rename"))
+ if (options_get_number(w->options, name))
w->active->flags |= PANE_CHANGED;
}
}
+ if (strcmp(name, "cursor-colour") == 0) {
+ RB_FOREACH(wp, window_pane_tree, &all_window_panes) {
+ c = options_get_number(wp->options, name);
+ wp->screen->default_ccolour = c;
+ }
+ }
if (strcmp(name, "key-table") == 0) {
TAILQ_FOREACH(loop, &clients, entry)
server_client_set_key_table(loop, NULL);