aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2016-05-21 22:35:15 +0200
committerBoris Faure <billiob@gmail.com>2016-05-21 22:35:15 +0200
commit021fbdb055d67e17c1ec5d5a0df428f31a5d38ea (patch)
treef0f0cb4a27a0baeed9c3eabaf58c2fab7100d527
parentMerge remote-tracking branch 'raboof/patch-1' (diff)
parentAllow font size to be updated via escape sequence (diff)
downloadterminology-021fbdb055d67e17c1ec5d5a0df428f31a5d38ea.tar.gz
Merge remote-tracking branch 'raboof/font_size_change'
-rw-r--r--src/bin/termptyesc.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/bin/termptyesc.c b/src/bin/termptyesc.c
index 0daeda4..cd920d1 100644
--- a/src/bin/termptyesc.c
+++ b/src/bin/termptyesc.c
@@ -1212,6 +1212,22 @@ err:
return -1;
}
+static void
+_handle_xterm_50_command(Termpty *ty,
+ char *s,
+ int len)
+{
+ int i;
+ int size;
+ for (i = 0; i < len - strlen(":size="); i++)
+ {
+ if (strncmp(s + i, ":size=", strlen(":size=")) == 0)
+ {
+ size = strtol(s + i + strlen(":size="), NULL, 10);
+ termio_font_size_set(ty->obj, size);
+ }
+ }
+}
static void
_handle_xterm_777_command(Termpty *ty EINA_UNUSED,
@@ -1417,6 +1433,17 @@ _handle_esc_xterm(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
#endif
}
break;
+ case 50:
+ DBG("xterm font support");
+ if (!*p)
+ goto err;
+ s = eina_unicode_unicode_to_utf8(p, &len);
+ if (s)
+ {
+ _handle_xterm_50_command(ty, s, len);
+ free(s);
+ }
+ break;
case 777:
DBG("xterm notification support");
s = eina_unicode_unicode_to_utf8(p, &len);