summaryrefslogtreecommitdiffstats
path: root/screen.c
diff options
context:
space:
mode:
authornicm <nicm>2021-11-01 09:34:49 +0000
committernicm <nicm>2021-11-01 09:34:49 +0000
commit8d2286b76917debc4f6c3b0903ad2807ae254bb5 (patch)
tree5eb3353a6ecebeb3defb4701f63b75cbcfd81a61 /screen.c
parent4fe5aa99fb203ddb25089955d8814e1065e11a60 (diff)
Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue
2959.
Diffstat (limited to 'screen.c')
-rw-r--r--screen.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/screen.c b/screen.c
index 4c13b693..bc95705a 100644
--- a/screen.c
+++ b/screen.c
@@ -82,7 +82,8 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
s->path = NULL;
s->cstyle = SCREEN_CURSOR_DEFAULT;
- s->ccolour = xstrdup("");
+ s->ccolour = -1;
+ s->default_ccolour = -1;
s->tabs = NULL;
s->sel = NULL;
@@ -126,7 +127,6 @@ screen_free(struct screen *s)
free(s->tabs);
free(s->path);
free(s->title);
- free(s->ccolour);
if (s->write_list != NULL)
screen_write_free_list(s);
@@ -190,10 +190,9 @@ screen_set_cursor_style(struct screen *s, u_int style)
/* Set screen cursor colour. */
void
-screen_set_cursor_colour(struct screen *s, const char *colour)
+screen_set_cursor_colour(struct screen *s, int colour)
{
- free(s->ccolour);
- s->ccolour = xstrdup(colour);
+ s->ccolour = colour;
}
/* Set screen title. */