aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-01-26 22:27:44 +0100
committerBoris Faure <billiob@gmail.com>2019-01-26 22:27:44 +0100
commit4eefb44ee1b0351ef41f7442c562f884f7b6cfa7 (patch)
tree7598d7844c3626eaff44483a7b9ddadb92fe61f9 /src
parentwe're in 2019 (diff)
downloadterminology-4eefb44ee1b0351ef41f7442c562f884f7b6cfa7.tar.gz
termptyesc: handle DECSWBV + tests
Diffstat (limited to 'src')
-rw-r--r--src/bin/termptyesc.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index e65502f..b80c11c 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -2981,6 +2981,32 @@ _handle_esc_csi_vpa(Termpty *ty, Eina_Unicode **ptr)
ty->cursor_state.cy = arg - 1;
}
+static void
+_handle_esc_csi_decswbv(Termpty *ty, Eina_Unicode **ptr)
+{
+ Eina_Unicode *b = *ptr;
+ int arg = _csi_arg_get(ty, &b);
+
+ if (arg == -CSI_ARG_ERROR)
+ return;
+ DBG("DECSWBV - Set Warning Bell Volume: %d", arg);
+ switch (arg)
+ {
+ case 1:
+ DBG("Bell is off");
+ break;
+ case 2:
+ EINA_FALLTHROUGH;
+ case 3:
+ EINA_FALLTHROUGH;
+ case 4:
+ DBG("Bell volume is low");
+ break;
+ default:
+ DBG("Bell volume is high");
+ }
+}
+
static int
_handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
{
@@ -3182,6 +3208,10 @@ _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, const Eina_Unicode *ce)
case 't':
if (*(cc-1) == '$')
_handle_esc_csi_decrara(ty, &b, be-1);
+ else if (*(cc-1) == ' ')
+ {
+ _handle_esc_csi_decswbv(ty, &b);
+ }
else
{
arg = _csi_arg_get(ty, &b);