diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-04-24 07:13:02 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2020-04-24 07:13:02 +0100 |
commit | 5d69b9c4a7e8adc570e965189de0e5936fbf8e1c (patch) | |
tree | 6c19d518fefb16b0a1f78ecaeacf8a8f161bf039 /tty-features.c | |
parent | 2d8fd35de2c15b376dac41f9a1e6a62b22018976 (diff) | |
download | rtmux-5d69b9c4a7e8adc570e965189de0e5936fbf8e1c.tar.gz rtmux-5d69b9c4a7e8adc570e965189de0e5936fbf8e1c.tar.bz2 rtmux-5d69b9c4a7e8adc570e965189de0e5936fbf8e1c.zip |
Add a feature for bracketed paste.
Diffstat (limited to 'tty-features.c')
-rw-r--r-- | tty-features.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/tty-features.c b/tty-features.c index b0e4b8ca..6dfc26aa 100644 --- a/tty-features.c +++ b/tty-features.c @@ -25,7 +25,6 @@ /* * Still hardcoded: - * - bracket paste (sent if application asks for it); * - mouse (under kmous capability); * - focus events (under XT and focus-events option); * - default colours (under AX or op capabilities); @@ -123,6 +122,18 @@ static struct tty_feature tty_feature_usstyle = { 0 }; +/* Terminal supports cursor bracketed paste. */ +static const char *tty_feature_bpaste_capabilities[] = { + "Enbp=\E[?2004h", + "Dsbp=\\E[?2004l", + NULL +}; +static struct tty_feature tty_feature_bpaste = { + "bpaste", + tty_feature_bpaste_capabilities, + 0 +}; + /* Terminal supports cursor styles. */ static const char *tty_feature_cstyle_capabilities[] = { "Ss=\\E[%p1%d q", @@ -193,6 +204,7 @@ static struct tty_feature tty_feature_rectfill = { /* Available terminal features. */ static const struct tty_feature *tty_features[] = { &tty_feature_256, + &tty_feature_bpaste, &tty_feature_clipboard, &tty_feature_ccolour, &tty_feature_cstyle, @@ -297,19 +309,19 @@ tty_default_features(int *feat, const char *name, u_int version) const char *features; } table[] = { { .name = "mintty", - .features = "256,RGB,ccolour,clipboard,cstyle,margins,strikethrough,overline,title" + .features = "256,RGB,bpaste,ccolour,clipboard,cstyle,margins,overline,strikethrough,title" }, { .name = "tmux", - .features = "256,RGB,ccolour,clipboard,cstyle,overline,strikethough,title,usstyle" + .features = "256,RGB,bpaste,ccolour,clipboard,cstyle,overline,strikethough,title,usstyle" }, { .name = "rxvt-unicode", .features = "256,title" }, { .name = "iTerm2", - .features = "256,RGB,clipboard,cstyle,margins,strikethrough,sync,title" + .features = "256,RGB,bpaste,clipboard,cstyle,margins,strikethrough,sync,title" }, { .name = "XTerm", - .features = "256,RGB,ccolour,clipboard,cstyle,margins,rectfill,strikethrough,title" + .features = "256,RGB,bpaste,ccolour,clipboard,cstyle,margins,rectfill,strikethrough,title" } }; u_int i; |