kf* terminfo capabilities are poorly defined and rxvt uses them in a

different way from xterm, so add a feature flag for rxvt to make tmux
ignore the capabilities and instead rely on its builtin definitions.
This commit is contained in:
nicm
2022-06-14 07:29:00 +00:00
parent 42ddf02ffc
commit 616bde08ac
4 changed files with 111 additions and 36 deletions

View File

@ -250,6 +250,80 @@ static const struct tty_feature tty_feature_rectfill = {
TERM_DECFRA
};
/* Use builtin function keys only. */
static const char *tty_feature_ignorefkeys_capabilities[] = {
"kf0@",
"kf1@",
"kf2@",
"kf3@",
"kf4@",
"kf5@",
"kf6@",
"kf7@",
"kf8@",
"kf9@",
"kf10@",
"kf11@",
"kf12@",
"kf13@",
"kf14@",
"kf15@",
"kf16@",
"kf17@",
"kf18@",
"kf19@",
"kf20@",
"kf21@",
"kf22@",
"kf23@",
"kf24@",
"kf25@",
"kf26@",
"kf27@",
"kf28@",
"kf29@",
"kf30@",
"kf31@",
"kf32@",
"kf33@",
"kf34@",
"kf35@",
"kf36@",
"kf37@",
"kf38@",
"kf39@",
"kf40@",
"kf41@",
"kf42@",
"kf43@",
"kf44@",
"kf45@",
"kf46@",
"kf47@",
"kf48@",
"kf49@",
"kf50@",
"kf51@",
"kf52@",
"kf53@",
"kf54@",
"kf55@",
"kf56@",
"kf57@",
"kf58@",
"kf59@",
"kf60@",
"kf61@",
"kf62@",
"kf63@",
NULL
};
static const struct tty_feature tty_feature_ignorefkeys = {
"ignorefkeys",
tty_feature_ignorefkeys_capabilities,
0
};
/* Available terminal features. */
static const struct tty_feature *tty_features[] = {
&tty_feature_256,
@ -259,6 +333,7 @@ static const struct tty_feature *tty_features[] = {
&tty_feature_cstyle,
&tty_feature_extkeys,
&tty_feature_focus,
&tty_feature_ignorefkeys,
&tty_feature_margins,
&tty_feature_mouse,
&tty_feature_osc7,
@ -372,7 +447,7 @@ tty_default_features(int *feat, const char *name, u_int version)
",ccolour,cstyle,focus,overline,usstyle"
},
{ .name = "rxvt-unicode",
.features = "256,bpaste,ccolour,cstyle,mouse,title"
.features = "256,bpaste,ccolour,cstyle,mouse,title,ignorefkeys"
},
{ .name = "iTerm2",
.features = TTY_FEATURES_BASE_MODERN_XTERM