mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-03-07 04:34:03 -05:00
term: implement cursor blinking
Blinking can be enabled either by setting the cursor style with CSI Ps SP q and selecting a blinking style. Or, with 'CSI ? 12 h' Note that both affect the same internal state. I.e. you can disable blinking with CSI ? 12l after having selected a blinking cursor style. This is consistent with XTerm behavior.
This commit is contained in:
parent
5106937c7b
commit
7d29435d86
4 changed files with 93 additions and 9 deletions
11
csi.c
11
csi.c
|
|
@ -866,7 +866,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
|
||||
case 12:
|
||||
/* Ignored */
|
||||
term_cursor_blink_enable(term);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
|
|
@ -992,7 +992,7 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
|
||||
case 12:
|
||||
/* Ignored */
|
||||
term_cursor_blink_disable(term);
|
||||
break;
|
||||
|
||||
case 25:
|
||||
|
|
@ -1224,9 +1224,10 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
}
|
||||
|
||||
term->cursor_blinking = param == 0 || param & 1;
|
||||
if (term->cursor_blinking)
|
||||
LOG_WARN("unimplemented: blinking cursor");
|
||||
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