mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -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 */
|
case 6: /* steady bar */
|
||||||
term->cursor_style = CURSOR_BAR;
|
term->cursor_style = CURSOR_BAR;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
UNHANDLED();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (param == 0 || param & 1)
|
if (param <= 6) {
|
||||||
term_cursor_blink_enable(term);
|
if (param == 0 || param & 1)
|
||||||
else
|
term_cursor_blink_enable(term);
|
||||||
term_cursor_blink_disable(term);
|
else
|
||||||
|
term_cursor_blink_disable(term);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue