diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-11-01 09:34:50 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-11-01 09:34:50 +0000 |
commit | 515a879e380267e8941d7a95ae1978657f8c00fd (patch) | |
tree | d30eb095b57bfa3cf0996fafe44a7c6194758d34 /usr.bin/tmux/screen.c | |
parent | 16f59bbd5f0faff049d7393bf5ee4b5e3bb9326b (diff) |
Add a cursor-colour option, from Alexis Hildebrandt in GitHub issue
2959.
Diffstat (limited to 'usr.bin/tmux/screen.c')
-rw-r--r-- | usr.bin/tmux/screen.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/usr.bin/tmux/screen.c b/usr.bin/tmux/screen.c index 21d9d13b298..0ac7f6230a6 100644 --- a/usr.bin/tmux/screen.c +++ b/usr.bin/tmux/screen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.76 2021/10/05 12:46:02 nicm Exp $ */ +/* $OpenBSD: screen.c,v 1.77 2021/11/01 09:34:49 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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. */ |