Files
neovim/src/nvim/getchar.h
zeertzjq 7718b75846 refactor: move some mapping-related code to a separate file (#19061)
This marks the following Vim patches as ported:

vim-patch:8.1.1785: map functionality mixed with character input

Problem:    Map functionality mixed with character input.
Solution:   Move the map functionality to a separate file. (Yegappan
            Lakshmanan, closes vim/vim#4740)  Graduate the +localmap feature.
b66bab381c

vim-patch:8.2.3643: header for source file is outdated

Problem:    Header for source file is outdated.
Solution:   Make the header more accurate. (closes vim/vim#9186)
a3f83feb63

Also cherry-pick a change for <unique> mappings from patch 8.2.0807.
Rename map_clear_mode() to do_mapclear().
2022-06-23 21:17:11 +08:00

37 lines
1010 B
C

#ifndef NVIM_GETCHAR_H
#define NVIM_GETCHAR_H
#include "nvim/os/fileio.h"
#include "nvim/vim.h"
/// Values for "noremap" argument of ins_typebuf()
///
/// Also used for map->m_noremap and menu->noremap[].
enum RemapValues {
REMAP_YES = 0, ///< Allow remapping.
REMAP_NONE = -1, ///< No remapping.
REMAP_SCRIPT = -2, ///< Remap script-local mappings only.
REMAP_SKIP = -3, ///< No remapping for first char.
};
// Argument for flush_buffers().
typedef enum {
FLUSH_MINIMAL,
FLUSH_TYPEAHEAD, // flush current typebuf contents
FLUSH_INPUT, // flush typebuf and inchar() input
} flush_buffers_T;
#define KEYLEN_PART_KEY (-1) // keylen value for incomplete key-code
#define KEYLEN_PART_MAP (-2) // keylen value for incomplete mapping
/// Maximum number of streams to read script from
enum { NSCRIPT = 15, };
/// Streams to read script from
extern FileDescriptor *scriptin[NSCRIPT];
#ifdef INCLUDE_GENERATED_DECLARATIONS
# include "getchar.h.generated.h"
#endif
#endif // NVIM_GETCHAR_H