summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2011-05-20 19:17:39 +0000
committerNicholas Marriott <nicm@openbsd.org>2011-05-20 19:17:39 +0000
commit3ea5e06bfb04278fa53885e551bc363a84bad8d1 (patch)
tree155061457c80262457ba005863c44df9aaeeb8c5 /screen.c
parent944b5e6fa04e014501f465e3898315c84d10bd9e (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 'screen.c')
-rw-r--r--screen.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/screen.c b/screen.c
index 5e3be88c..3c8a5235 100644
--- a/screen.c
+++ b/screen.c
@@ -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)