diff options
author | Bram Moolenaar <Bram@vim.org> | 2021-12-21 09:12:23 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2021-12-21 09:12:23 +0000 |
commit | 6f79e614b25caebd35cf0d82b6f3b7e0733849ec (patch) | |
tree | 445fedcce235de72ac9f4e195eddbb060b58a296 /src | |
parent | 8d95d7091da08d0a236be4a16616e3dda388e58d (diff) | |
download | vim-git-6f79e614b25caebd35cf0d82b6f3b7e0733849ec.tar.gz |
patch 8.2.3864: cannot disable requesting key codes from xtermv8.2.3864
Problem: Cannot disable requesting key codes from xterm.
Solution: Add the 'xtermcodes' option, default on.
Diffstat (limited to 'src')
-rw-r--r-- | src/option.h | 3 | ||||
-rw-r--r-- | src/optiondefs.h | 3 | ||||
-rw-r--r-- | src/term.c | 5 | ||||
-rw-r--r-- | src/version.c | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/src/option.h b/src/option.h index 49d869bfc..a82258e3a 100644 --- a/src/option.h +++ b/src/option.h @@ -485,6 +485,7 @@ EXTERN int p_deco; // 'delcombine' #ifdef FEAT_EVAL EXTERN char_u *p_ccv; // 'charconvert' #endif +EXTERN int p_cdh; // 'cdhome' EXTERN char_u *p_cino; // 'cinoptions' #ifdef FEAT_CMDWIN EXTERN char_u *p_cedit; // 'cedit' @@ -1094,7 +1095,7 @@ EXTERN int p_write; // 'write' EXTERN int p_wa; // 'writeany' EXTERN int p_wb; // 'writebackup' EXTERN long p_wd; // 'writedelay' -EXTERN int p_cdh; // 'cdhome' +EXTERN int p_xtermcodes; // 'xtermcodes' /* * "indir" values for buffer-local options. diff --git a/src/optiondefs.h b/src/optiondefs.h index c39244288..cc4ad9e57 100644 --- a/src/optiondefs.h +++ b/src/optiondefs.h @@ -2941,6 +2941,9 @@ static struct vimoption options[] = {"writedelay", "wd", P_NUM|P_VI_DEF, (char_u *)&p_wd, PV_NONE, {(char_u *)0L, (char_u *)0L} SCTX_INIT}, + {"xtermcodes", NULL, P_BOOL|P_VI_DEF, + (char_u *)&p_xtermcodes, PV_NONE, + {(char_u *)TRUE, (char_u *)0L} SCTX_INIT}, // terminal output codes #define p_term(sss, vvv) {sss, NULL, P_STRING|P_VI_DEF|P_RALL|P_SECURE, \ diff --git a/src/term.c b/src/term.c index f74b18add..e97ec2c4d 100644 --- a/src/term.c +++ b/src/term.c @@ -4694,7 +4694,7 @@ handle_version_response(int first, int *arg, int argc, char_u *tp) // 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 @@ got_code_from_term(char_u *code, int len) 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 { diff --git a/src/version.c b/src/version.c index 586d2ec63..bbb21576e 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3864, +/**/ 3863, /**/ 3862, |