summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2011-05-20 19:17:40 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2011-05-20 19:17:40 +0000
commit32dbf68cc6dcbdd07ed1076c10c5c5e7f32039bd (patch)
treec5682219fbb5c8ae7f270653d3e01900844fc08f /usr.bin/tmux/screen.c
parent75e7ea3f727bdebb3d1032f42e25592f7fa9d9a1 (diff)
Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
Diffstat (limited to 'usr.bin/tmux/screen.c')
-rw-r--r--usr.bin/tmux/screen.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/usr.bin/tmux/screen.c b/usr.bin/tmux/screen.c
index bb6270e2dc9..6c9b4412112 100644
--- a/usr.bin/tmux/screen.c
+++ b/usr.bin/tmux/screen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: screen.c,v 1.20 2011/05/20 19:03:58 nicm Exp $ */
+/* $OpenBSD: screen.c,v 1.21 2011/05/20 19:17:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -40,6 +40,7 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
else
s->title = xstrdup("");
+ s->cstyle = 0;
s->ccolour = xstrdup("");
s->tabs = NULL;
@@ -91,6 +92,14 @@ screen_reset_tabs(struct screen *s)
bit_set(s->tabs, i);
}
+/* Set screen cursor style. */
+void
+screen_set_cursor_style(struct screen *s, u_int style)
+{
+ if (style <= 4)
+ s->cstyle = style;
+}
+
/* Set screen cursor colour. */
void
screen_set_cursor_colour(struct screen *s, const char *colour_string)