diff options
author | nicm <nicm> | 2020-05-16 14:22:51 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-16 14:22:51 +0000 |
commit | 4e0a718666e3c24e69be107d0a294a9ae9f59388 (patch) | |
tree | 50a49690c4fb9b668e850b0638243c12999f03ca /tty-features.c | |
parent | 41dec585df8723a8e268a80930d7f9ce395829dc (diff) | |
download | rtmux-4e0a718666e3c24e69be107d0a294a9ae9f59388.tar.gz rtmux-4e0a718666e3c24e69be107d0a294a9ae9f59388.tar.bz2 rtmux-4e0a718666e3c24e69be107d0a294a9ae9f59388.zip |
Add extension terminfo(5) capabilities for margins.
Diffstat (limited to 'tty-features.c')
-rw-r--r-- | tty-features.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tty-features.c b/tty-features.c index a7f2a4b0..9eb446d4 100644 --- a/tty-features.c +++ b/tty-features.c @@ -34,7 +34,7 @@ * * Also: * - XT is used to decide whether to send DA and XDA; - * - DECSLRM and DECFRA use a flag instead of capabilities; + * - DECFRA uses a flag instead of capabilities; * - UTF-8 is a separate flag on the client; needed for unattached clients. */ @@ -84,7 +84,7 @@ static const char *tty_feature_rgb_capabilities[] = { static struct tty_feature tty_feature_rgb = { "RGB", tty_feature_rgb_capabilities, - (TERM_256COLOURS|TERM_RGBCOLOURS) + TERM_256COLOURS|TERM_RGBCOLOURS }; /* Terminal supports 256 colours. */ @@ -159,9 +159,16 @@ static struct tty_feature tty_feature_sync = { }; /* Terminal supports DECSLRM margins. */ +static const char *tty_feature_margins_capabilities[] = { + "Enmg=\\E[?69h", + "Dsmg=\\E[?69l", + "Clmg=\\E[s", + "Cmg=\\E[%i%p1%d;%p2%ds", + NULL +}; static struct tty_feature tty_feature_margins = { "margins", - NULL, + tty_feature_margins_capabilities, TERM_DECSLRM }; @@ -194,6 +201,8 @@ tty_add_features(int *feat, const char *s, const char *separators) char *next, *loop, *copy; u_int i; + log_debug("%s: %s", __func__, s); + loop = copy = xstrdup(s); while ((next = strsep(&loop, separators)) != NULL) { for (i = 0; i < nitems(tty_features); i++) { |