summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/window.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2022-06-17 07:28:06 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2022-06-17 07:28:06 +0000
commitb8f1ccc43128f1b0173c6f742c6f8180e4320cb9 (patch)
treef5dc2eab7a067ab54970f9e405db816d7d86ccc0 /usr.bin/tmux/window.c
parent5970622f92bcfa489e510816c403f8b178710cb6 (diff)
Check cursor options when a pane is created, not just when they are changed.
Diffstat (limited to 'usr.bin/tmux/window.c')
-rw-r--r--usr.bin/tmux/window.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/usr.bin/tmux/window.c b/usr.bin/tmux/window.c
index 7ca42aef8c0..44c5b886953 100644
--- a/usr.bin/tmux/window.c
+++ b/usr.bin/tmux/window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window.c,v 1.280 2022/05/30 12:55:25 nicm Exp $ */
+/* $OpenBSD: window.c,v 1.281 2022/06/17 07:28:05 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -933,6 +933,7 @@ window_pane_create(struct window *w, u_int sx, u_int sy, u_int hlimit)
screen_init(&wp->base, sx, sy, hlimit);
wp->screen = &wp->base;
+ window_pane_default_cursor(wp);
screen_init(&wp->status_screen, 1, 1, 0);
@@ -1608,3 +1609,17 @@ window_set_fill_character(struct window *w)
w->fill_character = ud;
}
}
+
+void
+window_pane_default_cursor(struct window_pane *wp)
+{
+ struct screen *s = wp->screen;
+ int c;
+
+ c = options_get_number(wp->options, "cursor-colour");
+ s->default_ccolour = c;
+
+ c = options_get_number(wp->options, "cursor-style");
+ s->default_mode = 0;
+ screen_set_cursor_style(c, &s->default_cstyle, &s->default_mode);
+}