summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2020-07-06 23:57:37 +0200
committerBoris Faure <billiob@gmail.com>2020-07-06 23:57:37 +0200
commitf29190bdaabe5c6f4a5ce2dcef7b45e3f79101e7 (patch)
treec81d4d5d08469bc647d7c5a3d06e0168605bbb5b
parenta99ddc10d5208944bae6fa0084849755d8502438 (diff)
termptyesc: debug (re)setting cursor color + test
Do nothing for the moment. One could think about using color class for that.
-rw-r--r--src/bin/termptyesc.c6
-rw-r--r--tests/tests.results1
-rwxr-xr-xtests/xterm-set-cursor-color.sh22
3 files changed, 27 insertions, 2 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 4965a3b..70027b8 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -3622,7 +3622,7 @@ _osc_arg_get(Termpty *ty, Eina_Unicode **ptr)
3622 goto error; 3622 goto error;
3623 } 3623 }
3624 } 3624 }
3625 if (*b != ';') 3625 if (*b != ';' && *b != BEL)
3626 { 3626 {
3627 sum = -ESC_ARG_ERROR; 3627 sum = -ESC_ARG_ERROR;
3628 goto error; 3628 goto error;
@@ -3636,7 +3636,6 @@ _osc_arg_get(Termpty *ty, Eina_Unicode **ptr)
3636error: 3636error:
3637 ERR("Invalid OSC argument"); 3637 ERR("Invalid OSC argument");
3638 ty->decoding_error = EINA_TRUE; 3638 ty->decoding_error = EINA_TRUE;
3639 *ptr = NULL;
3640 return sum; 3639 return sum;
3641} 3640}
3642 3641
@@ -4322,6 +4321,9 @@ _handle_esc_osc(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
4322 goto err; 4321 goto err;
4323 _handle_xterm_11_command(ty, p, cc - c - (p - buf)); 4322 _handle_xterm_11_command(ty, p, cc - c - (p - buf));
4324 break; 4323 break;
4324 case 12:
4325 DBG("Set cursor color");
4326 break;
4325 case 50: 4327 case 50:
4326 DBG("xterm font support"); 4328 DBG("xterm font support");
4327 if (!p || !*p) 4329 if (!p || !*p)
diff --git a/tests/tests.results b/tests/tests.results
index f50f65e..b25ba81 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -148,3 +148,4 @@ xterm-osc-11.sh 3e02038964b78d948fb599c996bf370d
148xterm-colors-sharp.sh 79d6f72df04237d76a0fa3e722dcec5b 148xterm-colors-sharp.sh 79d6f72df04237d76a0fa3e722dcec5b
149xterm-colors-rgb.sh d9b55817ef8428343105b44dabd535a8 149xterm-colors-rgb.sh d9b55817ef8428343105b44dabd535a8
150xterm-colors-rgbi.sh d9b55817ef8428343105b44dabd535a8 150xterm-colors-rgbi.sh d9b55817ef8428343105b44dabd535a8
151xterm-set-cursor-color.sh e11819850eb17c3b09b94743e6b64ebd
diff --git a/tests/xterm-set-cursor-color.sh b/tests/xterm-set-cursor-color.sh
new file mode 100755
index 0000000..0d7004e
--- /dev/null
+++ b/tests/xterm-set-cursor-color.sh
@@ -0,0 +1,22 @@
1#!/bin/sh
2
3# char width: 7
4# char height: 15
5
6# set color
7printf '\033[0;31;3m'
8
9# clear screen
10printf '\033[2J'
11
12# move to 0; 0
13printf '\033[0;0H'
14
15# set color
16printf '\033[0m'
17
18# set cursor color
19printf '\033]12;#ff00ff\007'
20exit 0
21# reset cursor color
22printf '\033]112\007'