aboutsummaryrefslogtreecommitdiff
path: root/screen.c
diff options
context:
space:
mode:
authorTiago Cunha <tcunha@gmx.com>2011-05-22 16:25:02 +0000
committerTiago Cunha <tcunha@gmx.com>2011-05-22 16:25:02 +0000
commit719755574d4c4a5af1b255cb709c9ce8ee62f7ac (patch)
tree03810384ca0e94bbe93d9185ae77a1e8578c7be6 /screen.c
parent89f35125b4eb5c032f57e8acb70274b77e887f0b (diff)
downloadrtmux-719755574d4c4a5af1b255cb709c9ce8ee62f7ac.tar.gz
rtmux-719755574d4c4a5af1b255cb709c9ce8ee62f7ac.tar.bz2
rtmux-719755574d4c4a5af1b255cb709c9ce8ee62f7ac.zip
Sync OpenBSD patchset 915:
Support xterm(1) cursor colour change sequences through terminfo(5) Cc (set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked by me and Ailin Nemui.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/screen.c b/screen.c
index 292a5f03..07e0c33b 100644
--- a/screen.c
+++ b/screen.c
@@ -1,4 +1,4 @@
-/* $Id: screen.c,v 1.104 2011-05-05 10:10:57 tcunha Exp $ */
+/* $Id: screen.c,v 1.105 2011-05-22 16:25:02 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->ccolour = xstrdup("");
s->tabs = NULL;
screen_reinit(s);
@@ -72,6 +73,7 @@ screen_free(struct screen *s)
if (s->tabs != NULL)
xfree(s->tabs);
xfree(s->title);
+ xfree(s->ccolour);
grid_destroy(s->grid);
}
@@ -90,6 +92,14 @@ screen_reset_tabs(struct screen *s)
bit_set(s->tabs, i);
}
+/* Set screen cursor colour. */
+void
+screen_set_cursor_colour(struct screen *s, const char *colour_string)
+{
+ xfree(s->ccolour);
+ s->ccolour = xstrdup(colour_string);
+}
+
/* Set screen title. */
void
screen_set_title(struct screen *s, const char *title)