diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-08-21 17:45:02 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-08-21 17:45:02 +0200 |
commit | 920694c1b60fac8017b8909efcc24f189804a9bb (patch) | |
tree | def5ea232552ca189a8fd9e2f78c93724cf68b17 /src/option.c | |
parent | 989f592f7ffcbafdc4ec35cee4dc65bd053e2077 (diff) | |
download | vim-git-920694c1b60fac8017b8909efcc24f189804a9bb.tar.gz |
patch 7.4.2236v7.4.2236
Problem: The 'langnoremap' option leads to double negatives. And it does
not work for the last character of a mapping.
Solution: Add 'langremap' with the opposite value. Keep 'langnoremap' for
backwards compatibility. Make it work for the last character of a
mapping. Make the test work.
Diffstat (limited to 'src/option.c')
-rw-r--r-- | src/option.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/option.c b/src/option.c index 1a5cd8e4f..9f1aaf1d1 100644 --- a/src/option.c +++ b/src/option.c @@ -1705,6 +1705,13 @@ static struct vimoption options[] = (char_u *)NULL, PV_NONE, #endif {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, + {"langremap", "lrm", P_BOOL|P_VI_DEF, +#ifdef FEAT_LANGMAP + (char_u *)&p_lrm, PV_NONE, +#else + (char_u *)NULL, PV_NONE, +#endif + {(char_u *)FALSE, (char_u *)0L} SCRIPTID_INIT}, {"laststatus", "ls", P_NUM|P_VI_DEF|P_RALL, #ifdef FEAT_WINDOWS (char_u *)&p_ls, PV_NONE, @@ -7894,6 +7901,15 @@ set_bool_option( compatible_set(); } +#ifdef FEAT_LANGMAP + if ((int *)varp == &p_lrm) + /* 'langremap' -> !'langnoremap' */ + p_lnr = !p_lrm; + else if ((int *)varp == &p_lnr) + /* 'langnoremap' -> !'langremap' */ + p_lrm = !p_lnr; +#endif + #ifdef FEAT_PERSISTENT_UNDO /* 'undofile' */ else if ((int *)varp == &curbuf->b_p_udf || (int *)varp == &p_udf) |