This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository terminology.
View the commit online.
commit bbcedcb95f09e8136dc6dea702e22fe617a318e5
Author: Boris Faure <bill...@gmail.com>
AuthorDate: Sat Mar 25 20:06:51 2023 +0100
termptyesc: handle empty CSI SRG 38/48
+ tests
---
src/bin/termptyesc.c | 6 ++++--
tests/csi-38-no-value.sh | 39 +++++++++++++++++++++++++++++++++++++++
tests/tests.results | 1 +
3 files changed, 44 insertions(+), 2 deletions(-)
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 419e01e..a8190bf 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1069,8 +1069,9 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr,
switch (arg)
{
case -ESC_ARG_ERROR:
+ EINA_FALLTHROUGH;
+ case -ESC_ARG_NO_VALUE:
return;
- /* TODO: -ESC_ARG_NO_VALUE */
case 1:
ty->termstate.att.fg256 = 0;
ty->termstate.att.fg = COL_INVIS;
@@ -1140,8 +1141,9 @@ _handle_esc_csi_color_set(Termpty *ty, Eina_Unicode **ptr,
switch (arg)
{
case -ESC_ARG_ERROR:
+ EINA_FALLTHROUGH;
+ case -ESC_ARG_NO_VALUE:
return;
- /* TODO: -ESC_ARG_NO_VALUE */
case 1:
ty->termstate.att.bg256 = 0;
ty->termstate.att.bg = COL_INVIS;
diff --git a/tests/csi-38-no-value.sh b/tests/csi-38-no-value.sh
new file mode 100755
index 0000000..40e6227
--- /dev/null
+++ b/tests/csi-38-no-value.sh
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+# clear screen
+printf '\033[2J'
+
+# fill space with E
+printf '\033#8'
+
+##
+# Test foreground
+##
+
+# move
+printf '\033[4;4H'
+# set color
+printf '\033[m\033[46;31;3m'
+printf 'foo'
+#set RGB
+printf '\033[48:2:244:144:25;38:2:56:150:199m'
+printf 'bar'
+printf '\033[1;38m'
+printf 'qux'
+
+
+##
+# Test background
+##
+
+# move
+printf '\033[8;4H'
+# set color
+printf '\033[m\033[46;31;3m'
+printf 'foo'
+#set RGB
+printf '\033[48:2:244:144:25;38:2:56:150:199m'
+printf 'bar'
+printf '\033[1;48m'
+printf 'qux'
+
diff --git a/tests/tests.results b/tests/tests.results
index ae1d102..c5695dc 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -152,3 +152,4 @@ xterm-colors-sharp.sh d35dc9a85f2e1f5b5be9a9d9bb876af7
xterm-colors-rgb.sh 29145c3cb5960cbec2559f20c17e9a6c
xterm-colors-rgbi.sh 29145c3cb5960cbec2559f20c17e9a6c
xterm-set-cursor-color.sh bb605a08705dce5456c825697cb62be3
+csi-38-no-value.sh 62a4f10751b13322fb048f8754d4c2ae
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.