patch 8.2.3864: cannot disable requesting key codes from xterm
Problem: Cannot disable requesting key codes from xterm.
Solution: Add the 'xtermcodes' option, default on.
diff --git a/src/term.c b/src/term.c
index f74b18a..e97ec2c 100644
--- a/src/term.c
+++ b/src/term.c
@@ -4694,7 +4694,7 @@
// If xterm version >= 141 try to get termcap codes. For other
// terminals the request should be ignored.
- if (version >= 141)
+ if (version >= 141 && p_xtermcodes)
{
LOG_TR(("Enable checking for XT codes"));
check_for_codes = TRUE;
@@ -6446,8 +6446,7 @@
if (name[0] == 'C' && name[1] == 'o')
{
// Color count is not a key code.
- i = atoi((char *)str);
- may_adjust_color_count(i);
+ may_adjust_color_count(atoi((char *)str));
}
else
{