mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
vim-patch:7.4.502 #2282
Problem: Language mapping also applies to mapped characters. Solution: Add the 'langnoremap' option, when on 'langmap' does not apply to mapped characters. (Christian Brabandt) https://github.com/vim/vim/releases/tag/v7-4-502
This commit is contained in:

committed by
Justin M. Keyes

parent
9d02e5b984
commit
2c7e8c38e0
@@ -77,12 +77,17 @@
|
||||
* Adjust chars in a language according to 'langmap' option.
|
||||
* NOTE that there is no noticeable overhead if 'langmap' is not set.
|
||||
* When set the overhead for characters < 256 is small.
|
||||
* Don't apply 'langmap' if the character comes from the Stuff buffer.
|
||||
* Don't apply 'langmap' if the character comes from the Stuff buffer or from a
|
||||
* mapping and the langnoremap option was set.
|
||||
* The do-while is just to ignore a ';' after the macro.
|
||||
*/
|
||||
# define LANGMAP_ADJUST(c, condition) \
|
||||
do { \
|
||||
if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0) \
|
||||
if (*p_langmap \
|
||||
&& (condition) \
|
||||
&& (!p_lnr || (p_lnr && typebuf_maplen() == 0)) \
|
||||
&& !KeyStuffed \
|
||||
&& (c) >= 0) \
|
||||
{ \
|
||||
if ((c) < 256) \
|
||||
c = langmap_mapchar[c]; \
|
||||
|
Reference in New Issue
Block a user