mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
refactor: run IWYU on entire repo
Reference: https://github.com/neovim/neovim/issues/6371.
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
#include "nvim/regexp_defs.h" // IWYU pragma: keep
|
||||
#include "nvim/types_defs.h" // IWYU pragma: keep
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "mapping.h.generated.h"
|
||||
#endif
|
||||
|
||||
/// Used for the first argument of do_map()
|
||||
enum {
|
||||
MAPTYPE_MAP = 0,
|
||||
@@ -20,6 +24,23 @@ enum {
|
||||
MAPTYPE_NOREMAP = 2,
|
||||
};
|
||||
|
||||
#ifdef INCLUDE_GENERATED_DECLARATIONS
|
||||
# include "mapping.h.generated.h"
|
||||
#endif
|
||||
/// 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 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) \
|
||||
&& (p_lrm || (vgetc_busy ? typebuf_maplen() == 0 : KeyTyped)) \
|
||||
&& !KeyStuffed \
|
||||
&& (c) >= 0) \
|
||||
{ \
|
||||
if ((c) < 256) \
|
||||
c = langmap_mapchar[c]; \
|
||||
else \
|
||||
c = langmap_adjust_mb(c); \
|
||||
} \
|
||||
} while (0)
|
||||
|
Reference in New Issue
Block a user