aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-01-08 22:55:48 +0100
committerBoris Faure <billiob@gmail.com>2019-01-08 22:55:48 +0100
commit395404c243ab97817721f3e62ae1b080c89dd3ec (patch)
tree8597d9fdb9875417a2c2744b6af15ab7fe61e46c /src
parenttermptyesc: Printer and Selective Erase are not supported (diff)
downloadterminology-395404c243ab97817721f3e62ae1b080c89dd3ec.tar.gz
termptyesc: handle CTC + tests
Diffstat (limited to 'src')
-rw-r--r--src/bin/termptyesc.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 4c13670..dae3b74 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -2735,8 +2735,25 @@ _handle_esc_csi_ctc(Termpty *ty, Eina_Unicode **ptr)
if (arg == -CSI_ARG_ERROR)
return;
- DBG("CTC - Cursor Tab Control: %d", arg);
- /* TODO */
+ switch (arg)
+ {
+ case -CSI_ARG_NO_VALUE:
+ EINA_FALLTHROUGH;
+ case 0:
+ TAB_SET(ty, ty->cursor_state.cx);
+ break;
+ case 2:
+ TAB_UNSET(ty, ty->cursor_state.cx);
+ break;
+ case 4:
+ EINA_FALLTHROUGH;
+ case 5:
+ termpty_clear_tabs_on_screen(ty);
+ break;
+ default:
+ ERR("invalid CTC argument %d", arg);
+ ty->decoding_error = EINA_TRUE;
+ }
}
static int