mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-21 01:40:16 -05:00
csi: implement 'erase characters' (CSI X)
This commit is contained in:
parent
f87d4f856a
commit
66033b9b1a
1 changed files with 11 additions and 0 deletions
11
csi.c
11
csi.c
|
|
@ -473,6 +473,17 @@ csi_dispatch(struct terminal *term, uint8_t final)
|
|||
break;
|
||||
}
|
||||
|
||||
case 'X': {
|
||||
/* Erase chars */
|
||||
int count = min(
|
||||
param_get(term, 0, 1), term->cols - term->cursor.col);
|
||||
|
||||
memset(&term->grid->cur_line[term->cursor.col],
|
||||
0, count * sizeof(term->grid->cur_line[0]));
|
||||
term_damage_erase(term, term->cursor.linear, count);
|
||||
break;
|
||||
}
|
||||
|
||||
case 'l': {
|
||||
/* Horizontal index */
|
||||
assert(false && "untested");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue