aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-05-22 16:26:09 +0000
committerTiago Cunha <tcunha@gmx.com>2011-05-22 16:26:09 +0000
commitb2f301f4e2b05764cd80da2ebc08e10605d0eeca (patch)
tree7f120658df8bbeab3acdffbed47915a4a4f47587 /screen.c
parent719755574d4c4a5af1b255cb709c9ce8ee62f7ac (diff)
downloadrtmux-b2f301f4e2b05764cd80da2ebc08e10605d0eeca.tar.gz
rtmux-b2f301f4e2b05764cd80da2ebc08e10605d0eeca.tar.bz2
rtmux-b2f301f4e2b05764cd80da2ebc08e10605d0eeca.zip
Sync OpenBSD patchset 916:
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.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index 07e0c33b..172ee439 100644
--- a/screen.c
+++ b/screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.105 2011-05-22 16:25:02 tcunha Exp $ */
+/* $Id: screen.c,v 1.106 2011-05-22 16:26:09 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -41,6 +41,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;
@@ -92,6 +93,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)