Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue

2959.
This commit is contained in:
nicm
2021-11-01 09:34:49 +00:00
parent 4fe5aa99fb
commit 8d2286b769
7 changed files with 96 additions and 30 deletions

View File

@ -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. */