mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
csi: ignore invalid parameters in 'CSI Ps <space> q'
Before this patch, an invalid parameter would not change the cursor style, but could cause the cursor to start (or stop) blinking.
This commit is contained in:
parent
921331854a
commit
af9e5aef2b
1 changed files with 10 additions and 4 deletions
14
csi.c
14
csi.c
|
|
@ -1452,12 +1452,18 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
case 6: /* steady bar */
|
||||
term->cursor_style = CURSOR_BAR;
|
||||
break;
|
||||
|
||||
default:
|
||||
UNHANDLED();
|
||||
break;
|
||||
}
|
||||
|
||||
if (param == 0 || param & 1)
|
||||
term_cursor_blink_enable(term);
|
||||
else
|
||||
term_cursor_blink_disable(term);
|
||||
if (param <= 6) {
|
||||
if (param == 0 || param & 1)
|
||||
term_cursor_blink_enable(term);
|
||||
else
|
||||
term_cursor_blink_disable(term);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue