From dde4f09f51ffaf8df5cc2a81eed935e31e1f94ba Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Thu, 31 Mar 2022 15:47:53 +0800 Subject: vim-patch:8.1.2145: cannot map when modifyOtherKeys is enabled Problem: Cannot map when modifyOtherKeys is enabled. Solution: Add the mapping twice, both with modifier and as 0x08. Use only the first one when modifyOtherKeys has been detected. https://github.com/vim/vim/commit/459fd785e4a8d044147a3f83a5fca8748528aa84 Add REPTERM_NO_SPECIAL instead of REPTERM_SPECIAL because the meaning of "special" is different between Vim and Nvim. Omit seenModifyOtherKeys as Nvim supports attaching multiple UIs. Omit tests as they send terminal codes. Keep the behavior of API functions. --- src/nvim/vim.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/nvim/vim.h') diff --git a/src/nvim/vim.h b/src/nvim/vim.h index 3c8a865fb1..2672d0b2bc 100644 --- a/src/nvim/vim.h +++ b/src/nvim/vim.h @@ -318,4 +318,10 @@ enum { FOLD_TEXT_LEN = 51, }; //!< buffer size for get_foldtext() #define REPLACE_CR_NCHAR (-1) #define REPLACE_NL_NCHAR (-2) +// Flags for replace_termcodes() +#define REPTERM_FROM_PART 1 +#define REPTERM_DO_LT 2 +#define REPTERM_NO_SPECIAL 4 +#define REPTERM_NO_SIMPLIFY 8 + #endif // NVIM_VIM_H -- cgit