diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-05-20 19:03:58 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-05-20 19:03:58 +0000 |
commit | 944b5e6fa04e014501f465e3898315c84d10bd9e (patch) | |
tree | 84bf7b9489fc4105d7c5a4c59df7058c867a19fe /screen.c | |
parent | 96e7f33da3078facc504c6c66d42956bc44b2e54 (diff) |
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.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -40,6 +40,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); @@ -71,6 +72,7 @@ screen_free(struct screen *s) if (s->tabs != NULL) xfree(s->tabs); xfree(s->title); + xfree(s->ccolour); grid_destroy(s->grid); } @@ -89,6 +91,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) |