robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

zeertzjqvim-patch:9.1.0642: Check that mapping rhs starts with lhs fails if not simplified (#29909)4b852bc555

master
1.3 KiB30 linesraw
1#pragma once
2
3#include <stdbool.h>
4
5#include "nvim/eval/typval_defs.h"
6
7enum { MAXMAPLEN = 50, };  ///< Maximum length of key sequence to be mapped.
8
9/// Structure used for mappings and abbreviations.
10typedef struct mapblock mapblock_T;
11struct mapblock {
12  mapblock_T *m_next;       ///< next mapblock in list
13  mapblock_T *m_alt;        ///< pointer to mapblock of the same mapping
14                            ///< with an alternative form of m_keys, or NULL
15                            ///< if there is no such mapblock
16  char *m_keys;             ///< mapped from, lhs
17  char *m_str;              ///< mapped to, rhs
18  char *m_orig_str;         ///< rhs as entered by the user
19  LuaRef m_luaref;          ///< lua function reference as rhs
20  int m_keylen;             ///< strlen(m_keys)
21  int m_mode;               ///< valid mode
22  int m_simplified;         ///< m_keys was simplified
23  int m_noremap;            ///< if non-zero no re-mapping for m_str
24  char m_silent;            ///< <silent> used, don't echo commands
25  char m_nowait;            ///< <nowait> used
26  char m_expr;              ///< <expr> used, m_str is an expression
27  sctx_T m_script_ctx;      ///< SCTX where map was defined
28  char *m_desc;             ///< description of mapping
29  bool m_replace_keycodes;  ///< replace keycodes in result of expression
30};