summaryrefslogtreecommitdiffstats
path: root/options.c
diff options
context:
space:
mode:
authornicm <nicm>2021-11-01 09:34:49 +0000
committernicm <nicm>2021-11-01 09:34:49 +0000
commit8d2286b76917debc4f6c3b0903ad2807ae254bb5 (patch)
tree5eb3353a6ecebeb3defb4701f63b75cbcfd81a61 /options.c
parent4fe5aa99fb203ddb25089955d8814e1065e11a60 (diff)
Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue
2959.
Diffstat (limited to 'options.c')
-rw-r--r--options.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/options.c b/options.c
index 65263fd0..4da1c408 100644
--- a/options.c
+++ b/options.c
@@ -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);