mirror of
https://github.com/tmate-io/tmate.git
synced 2026-01-23 02:24:06 +00:00
Support DECSCUSR sequence to set the cursor style with two new
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
This commit is contained in:
parent
944b5e6fa0
commit
3ea5e06bfb
7 changed files with 53 additions and 0 deletions
9
screen.c
9
screen.c
|
|
@ -40,6 +40,7 @@ screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit)
|
|||
else
|
||||
s->title = xstrdup("");
|
||||
|
||||
s->cstyle = 0;
|
||||
s->ccolour = xstrdup("");
|
||||
s->tabs = NULL;
|
||||
|
||||
|
|
@ -91,6 +92,14 @@ screen_reset_tabs(struct screen *s)
|
|||
bit_set(s->tabs, i);
|
||||
}
|
||||
|
||||
/* Set screen cursor style. */
|
||||
void
|
||||
screen_set_cursor_style(struct screen *s, u_int style)
|
||||
{
|
||||
if (style <= 4)
|
||||
s->cstyle = style;
|
||||
}
|
||||
|
||||
/* Set screen cursor colour. */
|
||||
void
|
||||
screen_set_cursor_colour(struct screen *s, const char *colour_string)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue