termptyesc: support DECST8C + tests
This commit is contained in:
parent
19631a70f6
commit
a2656754bd
|
@ -2700,6 +2700,37 @@ _handle_xterm_unset_title_modes(Termpty *ty EINA_UNUSED,
|
||||||
DBG("Unset Title Modes: TODO");
|
DBG("Unset Title Modes: TODO");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_handle_esc_csi_decst8c(Termpty *ty, Eina_Unicode **ptr)
|
||||||
|
{
|
||||||
|
Eina_Unicode *b = *ptr;
|
||||||
|
int arg = _csi_arg_get(ty, &b);
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (arg == -CSI_ARG_ERROR)
|
||||||
|
return;
|
||||||
|
if ((arg != -CSI_ARG_NO_VALUE) && (arg != 5))
|
||||||
|
return;
|
||||||
|
|
||||||
|
DBG("DECST8C - Set Tab at Every 8 Columns: %d", arg);
|
||||||
|
termpty_clear_tabs_on_screen(ty);
|
||||||
|
for (i = 0; i < ty->w; i += TAB_WIDTH)
|
||||||
|
{
|
||||||
|
TAB_SET(ty, i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_handle_esc_csi_ctc(Termpty *ty, Eina_Unicode **ptr)
|
||||||
|
{
|
||||||
|
Eina_Unicode *b = *ptr;
|
||||||
|
int arg = _csi_arg_get(ty, &b);
|
||||||
|
|
||||||
|
if (arg == -CSI_ARG_ERROR)
|
||||||
|
return;
|
||||||
|
DBG("CTC - Cursor Tab Control: %d", arg);
|
||||||
|
/* TODO */
|
||||||
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
|
@ -2793,6 +2824,12 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
|
||||||
else
|
else
|
||||||
_handle_esc_csi_sd(ty, &b);
|
_handle_esc_csi_sd(ty, &b);
|
||||||
break;
|
break;
|
||||||
|
case 'W':
|
||||||
|
if (*b == '?')
|
||||||
|
_handle_esc_csi_decst8c(ty, &b);
|
||||||
|
else
|
||||||
|
_handle_esc_csi_ctc(ty, &b);
|
||||||
|
break;
|
||||||
case 'X': // erase N chars
|
case 'X': // erase N chars
|
||||||
arg = _csi_arg_get(ty, &b);
|
arg = _csi_arg_get(ty, &b);
|
||||||
if (arg == -CSI_ARG_ERROR)
|
if (arg == -CSI_ARG_ERROR)
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# fill space with E
|
||||||
|
printf '\033#8'
|
||||||
|
# set color
|
||||||
|
printf '\033[46;31;3m'
|
||||||
|
# set tabs
|
||||||
|
printf '\033H\033H\033[3C\033H\033[4C\033H\033[5C\033H\033[6C\033H'
|
||||||
|
printf '\033[7C\033H\033[8C\033H\033[9C'
|
||||||
|
# show # on tabs
|
||||||
|
printf '\n#\t#\t#\t#\t#\t#\t#\t#\t#\t#\t#'
|
||||||
|
printf '\n#\t#\t#\t#\t#\t#\t#\t#\t#\t#\t#'
|
||||||
|
printf '\033[?5W'
|
||||||
|
printf '\n#\t#\t#\t#\t#\t#\t#\t#\t#\t#\t#'
|
|
@ -62,3 +62,4 @@ il.sh 1788258650a94f2568d05f749b6cf578
|
||||||
dl.sh e1e0ba19345d2ebf888f5a3e37f27037
|
dl.sh e1e0ba19345d2ebf888f5a3e37f27037
|
||||||
su.sh 591185f42b75daa61726217033a17eaf
|
su.sh 591185f42b75daa61726217033a17eaf
|
||||||
sd.sh 4bfda7ec3e6192acab077de2bc270525
|
sd.sh 4bfda7ec3e6192acab077de2bc270525
|
||||||
|
decst8c.sh 0ea805e8f4c2626ce66c566a10548d0f
|
||||||
|
|
Loading…
Reference in New Issue