termptyesc: refuse no value on decfra on the character to fill up + tests

This commit is contained in:
Boris Faure 2018-12-29 15:19:31 +01:00
parent 19a99dadff
commit 6e8faa30a7
5 changed files with 85 additions and 2 deletions

View File

@ -1528,14 +1528,13 @@ _handle_esc_csi_decfra(Termpty *ty, Eina_Unicode **b)
DBG("DECFRA (%d; %d;%d;%d;%d) Fill Rectangular Area",
c, top, left, bottom, right);
if ((c == -CSI_ARG_ERROR) ||
(c == -CSI_ARG_NO_VALUE) ||
(top == -CSI_ARG_ERROR) ||
(left == -CSI_ARG_ERROR) ||
(bottom == -CSI_ARG_ERROR) ||
(right == -CSI_ARG_ERROR))
return;
/* TODO: -CSI_ARG_NO_VALUE */
if (! ((c >= 32 && c <= 126) || (c >= 160 && c <= 255)))
return;

View File

@ -68,6 +68,7 @@ done
# move
printf '\033[11;81H'
# decfi, do nothing. Xterm seems change wrapping here. I don't see why
# @xtermbug
printf 'f\033\071g'
# move

View File

@ -0,0 +1,38 @@
#!/bin/sh
# move to 0; 0
printf '\033[H'
# fill space
for _ in $(seq 0 23); do
for _ in $(seq 0 7); do
printf '\-/|\\~_>^<'
done
done
# move to 0; 0
printf '\033[H'
#set color
printf '\033[46;31;3m'
# set top/bottom margins:
printf '\033[5;20r'
# allow left/right margins
printf '\033[?69h'
# set left/right margins:
printf '\033[5;74s'
# DECFRA
# fill inside rect with nothing
printf '\033[;10;40;15;45\044x'
# fill inside rect with invalid value
printf '\033[30;10;40;15;45\044x'
# top left corner
printf '\033[64;;;10;10\044x'
# bottom right corner
printf '\033[64;17;70;;\044x'
# DECERA
# top right corner
printf '\033[;70;10;\044z'
# bottom left corner
printf '\033[17;;;10\044z'

View File

@ -0,0 +1,43 @@
#!/bin/sh
# move to 0; 0
printf '\033[H'
# fill space
for _ in $(seq 0 23); do
for _ in $(seq 0 7); do
printf '\-/|\\~_>^<'
done
done
# move to 0; 0
printf '\033[H'
#set color
printf '\033[46;31;3m'
# set top/bottom margins:
printf '\033[2;23r'
# allow left/right margins
printf '\033[?69h'
# set left/right margins:
printf '\033[3;78s'
# restrict cursor
printf '\033[?6h'
# DECFRA
# fill inside rect with nothing
printf '\033[;10;40;15;45\044x'
# fill inside rect with invalid value
printf '\033[30;10;40;15;45\044x'
# top left corner
# @xtermbug
printf '\033[64;;;10;10\044x'
# bottom right corner
printf '\033[64;17;70;;\044x'
# DECERA
# top right corner
printf '\033[;70;10;\044z'
# bottom left corner
# @xtermbug
printf '\033[17;;;10\044z'

View File

@ -3,6 +3,8 @@ decfra-restrict-cursor.sh 0a595dc0088097dd235dd5c8801a3eb5
decera-no-restrict-cursor.sh 9d33acf9eca6eed4192e6d7f5104d202
decera-restrict-cursor.sh 89b15109e4e2ade943a2ab3990729931
decera-decfra-extra.sh abfe90a1df148bf15e7bf0d56163c76a
decfra-decera-default-values-restrict-cursor.sh 9710ed6167f2127671dbab2d7dbeb1eb
decfra-decera-default-values-no-restrict-cursor.sh 6508b473da2de3127dd65da0abe0c877
cursor-movements.sh 6b916da9bdb377e199bba69b1efefac6
fonts.sh d0dcea18258b95d5c869aa866fcae10f
cursor-shape-0.sh c91e01b0e859cc043f21d804a01bcd50