billiob pushed a commit to branch master.

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

commit 8f2e15478dea326349149d54a8885f3d552bdb5b
Author: Boris Faure <[email protected]>
Date:   Sun Dec 9 22:44:58 2018 +0100

    termptyesc: support DSR-OS + test
---
 src/bin/termptyesc.c | 14 ++++++++++++++
 tests/dsr-os.sh      |  8 ++++++++
 tests/tests.results  |  1 +
 3 files changed, 23 insertions(+)

diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 2ad0bf3..0dbc47a 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -971,6 +971,20 @@ _handle_esc_csi_dsr(Termpty *ty, Eina_Unicode *b)
    arg = _csi_arg_get(&b);
    switch (arg)
      {
+      case 5:
+         if (question_mark)
+           {
+              WRN("unhandled DSR (dec specific: %s) %d",
+                  (question_mark)? "yes": "no", arg);
+           }
+         else
+           {
+              /* DSR-OS (Operating Status)
+               * Reply Ok */
+              termpty_write(ty, "\033[0n",
+                            strlen("\033[0n"));
+           }
+         break;
       case 6:
            {
               int cx = ty->cursor_state.cx,
diff --git a/tests/dsr-os.sh b/tests/dsr-os.sh
new file mode 100755
index 0000000..08f9b5d
--- /dev/null
+++ b/tests/dsr-os.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+# fill space with E
+printf '\033#8'
+#set color
+printf '\033[46;31;3m'
+
+printf '\033[5n'
diff --git a/tests/tests.results b/tests/tests.results
index d8a28a3..b27fcb6 100644
--- a/tests/tests.results
+++ b/tests/tests.results
@@ -22,3 +22,4 @@ dsr-dir.sh 28b0d8b4b60f3c61d49cee69895a07b2
 dsr-kbd.sh 1c474c101697080a85563d9b5bc1505c
 dsr-msr.sh 1e695391937cf7235ba96dbeae5227fd
 dsr-deccksr.sh 6c3483e8e47a110a7b97eaffd9c5ff83
+dsr-os.sh 1645f13652d7ee51d66dc93000247280

-- 


Reply via email to