Implement ECH (erase character, CSI X). Reported by Christian Neukirchen.

This commit is contained in:
Nicholas Marriott
2013-01-15 23:18:55 +00:00
parent bc2e4a36df
commit 44f8e1caff
5 changed files with 50 additions and 0 deletions

View File

@ -135,6 +135,7 @@ enum input_csi_type {
INPUT_CSI_DECSTBM,
INPUT_CSI_DL,
INPUT_CSI_DSR,
INPUT_CSI_ECH,
INPUT_CSI_ED,
INPUT_CSI_EL,
INPUT_CSI_HPA,
@ -167,6 +168,7 @@ const struct input_table_entry input_csi_table[] = {
{ 'L', "", INPUT_CSI_IL },
{ 'M', "", INPUT_CSI_DL },
{ 'P', "", INPUT_CSI_DCH },
{ 'X', "", INPUT_CSI_ECH },
{ 'Z', "", INPUT_CSI_CBT },
{ 'c', "", INPUT_CSI_DA },
{ 'c', ">", INPUT_CSI_DA_TWO },
@ -1143,6 +1145,9 @@ input_csi_dispatch(struct input_ctx *ictx)
break;
}
break;
case INPUT_CSI_ECH:
screen_write_clearcharacter(sctx, input_get(ictx, 0, 1, 1));
break;
case INPUT_CSI_DCH:
screen_write_deletecharacter(sctx, input_get(ictx, 0, 1, 1));
break;