billiob pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=aebbed39e6c9d13bb284208c50a23589850c4dd9

commit aebbed39e6c9d13bb284208c50a23589850c4dd9
Author: Boris Faure <[email protected]>
Date:   Sun Dec 9 22:39:45 2018 +0100

    termptyesc: add support DSR-DECCKSR + test
---
 src/bin/termptyesc.c | 14 ++++++++++++++
 tests/dsr-deccksr.sh | 10 ++++++++++
 tests/tests.results  |  1 +
 3 files changed, 25 insertions(+)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 8db6bd9..2ad0bf3 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1025,6 +1025,20 @@ _handle_esc_csi_dsr(Termpty *ty, Eina_Unicode *b)
                   (question_mark)? "yes": "no", arg);
            }
          break;
+      case 63:
+         if (question_mark)
+           {
+              /* DSR-DECCKSR (Memory Checksum) */
+              int pid = _csi_arg_get(&b);
+              len = snprintf(bf, sizeof(bf), "\033P%u!~0000\033\\", pid);
+              termpty_write(ty, bf, len);
+           }
+         else
+           {
+              WRN("unhandled DSR (dec specific: %s) %d",
+                  (question_mark)? "yes": "no", arg);
+           }
+         break;
       case 75:
          if (question_mark)
            {
diff --git a/tests/dsr-deccksr.sh b/tests/dsr-deccksr.sh
new file mode 100755
index 0000000..c909fad
--- /dev/null
+++ b/tests/dsr-deccksr.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+# fill space with E
+printf '\033#8'
+#set color
+printf '\033[46;31;3m'
+
+printf '\033[?63;n'
+printf '\033[?63;0n'
+printf '\033[?63;1337n'
diff --git a/tests/tests.results b/tests/tests.results
index fe8721d..d8a28a3 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -21,3 +21,4 @@ dsr-cpr.sh a03cfba07a7b76075a4126f452d48ad5
 dsr-dir.sh 28b0d8b4b60f3c61d49cee69895a07b2
 dsr-kbd.sh 1c474c101697080a85563d9b5bc1505c
 dsr-msr.sh 1e695391937cf7235ba96dbeae5227fd
+dsr-deccksr.sh 6c3483e8e47a110a7b97eaffd9c5ff83

-- 


Reply via email to