termptyesc: debug (re)setting cursor color + test

Do nothing for the moment. One could think about using color class for
that.
This commit is contained in:
Boris Faure 2020-07-06 23:57:37 +02:00
parent a99ddc10d5
commit f29190bdaa
Signed by: borisfaure
GPG Key ID: 35C0410516166BE8
3 changed files with 27 additions and 2 deletions

View File

@ -3622,7 +3622,7 @@ _osc_arg_get(Termpty *ty, Eina_Unicode **ptr)
goto error;
}
}
if (*b != ';')
if (*b != ';' && *b != BEL)
{
sum = -ESC_ARG_ERROR;
goto error;
@ -3636,7 +3636,6 @@ _osc_arg_get(Termpty *ty, Eina_Unicode **ptr)
error:
ERR("Invalid OSC argument");
ty->decoding_error = EINA_TRUE;
*ptr = NULL;
return sum;
}
@ -4322,6 +4321,9 @@ _handle_esc_osc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
goto err;
_handle_xterm_11_command(ty, p, cc - c - (p - buf));
break;
case 12:
DBG("Set cursor color");
break;
case 50:
DBG("xterm font support");
if (!p || !*p)

View File

@ -148,3 +148,4 @@ xterm-osc-11.sh 3e02038964b78d948fb599c996bf370d
xterm-colors-sharp.sh 79d6f72df04237d76a0fa3e722dcec5b
xterm-colors-rgb.sh d9b55817ef8428343105b44dabd535a8
xterm-colors-rgbi.sh d9b55817ef8428343105b44dabd535a8
xterm-set-cursor-color.sh e11819850eb17c3b09b94743e6b64ebd

22
tests/xterm-set-cursor-color.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/sh
# char width: 7
# char height: 15
# set color
printf '\033[0;31;3m'
# clear screen
printf '\033[2J'
# move to 0; 0
printf '\033[0;0H'
# set color
printf '\033[0m'
# set cursor color
printf '\033]12;#ff00ff\007'
exit 0
# reset cursor color
printf '\033]112\007'