aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-01-07 23:11:57 +0100
committerBoris Faure <billiob@gmail.com>2019-01-07 23:13:52 +0100
commita2656754bdc5273e3145c119381eb7382ed92174 (patch)
treead3574ebd360c32fe35305c48b695d51c852787a /src
parenttermptyesc: 'T' can also refer to Unset Title Modes (not handled) (diff)
downloadterminology-a2656754bdc5273e3145c119381eb7382ed92174.tar.gz
termptyesc: support DECST8C + tests
Diffstat (limited to 'src')
-rw-r--r--src/bin/termptyesc.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 3ce48c8..51b8e70 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -2700,6 +2700,37 @@ _handle_xterm_unset_title_modes(Termpty *ty EINA_UNUSED,
DBG("Unset Title Modes: TODO");
}
+static void
+_handle_esc_csi_decst8c(Termpty *ty, Eina_Unicode **ptr)
+{
+ Eina_Unicode *b = *ptr;
+ int arg = _csi_arg_get(ty, &b);
+ int i;
+
+ if (arg == -CSI_ARG_ERROR)
+ return;
+ if ((arg != -CSI_ARG_NO_VALUE) && (arg != 5))
+ return;
+
+ DBG("DECST8C - Set Tab at Every 8 Columns: %d", arg);
+ termpty_clear_tabs_on_screen(ty);
+ for (i = 0; i < ty->w; i += TAB_WIDTH)
+ {
+ TAB_SET(ty, i);
+ }
+}
+
+static void
+_handle_esc_csi_ctc(Termpty *ty, Eina_Unicode **ptr)
+{
+ Eina_Unicode *b = *ptr;
+ int arg = _csi_arg_get(ty, &b);
+
+ if (arg == -CSI_ARG_ERROR)
+ return;
+ DBG("CTC - Cursor Tab Control: %d", arg);
+ /* TODO */
+}
static int
_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
@@ -2793,6 +2824,12 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
else
_handle_esc_csi_sd(ty, &b);
break;
+ case 'W':
+ if (*b == '?')
+ _handle_esc_csi_decst8c(ty, &b);
+ else
+ _handle_esc_csi_ctc(ty, &b);
+ break;
case 'X': // erase N chars
arg = _csi_arg_get(ty, &b);
if (arg == -CSI_ARG_ERROR)