0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

updated for version 7.2-109

This commit is contained in:
Bram Moolenaar
2009-02-21 19:28:48 +00:00
parent f69d9a354b
commit 28e8d27868
8 changed files with 129 additions and 40 deletions

View File

@@ -127,15 +127,31 @@
#ifdef FEAT_LANGMAP
/*
* Adjust chars in a language according to 'langmap' option.
* NOTE that there is NO overhead if 'langmap' is not set; but even
* when set we only have to do 2 ifs and an array lookup.
* 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.
* The do-while is just to ignore a ';' after the macro.
*/
# define LANGMAP_ADJUST(c, condition) do { \
if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0 && (c) < 256) \
c = langmap_mapchar[c]; \
# ifdef FEAT_MBYTE
# define LANGMAP_ADJUST(c, condition) \
do { \
if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0) \
{ \
if ((c) < 256) \
c = langmap_mapchar[c]; \
else \
c = langmap_adjust_mb(c); \
} \
} while (0)
# else
# define LANGMAP_ADJUST(c, condition) \
do { \
if (*p_langmap && (condition) && !KeyStuffed && (c) >= 0 && (c) < 256) \
c = langmap_mapchar[c]; \
} while (0)
# endif
#else
# define LANGMAP_ADJUST(c, condition) /* nop */
#endif
/*