diff options
Diffstat (limited to 'src/nvim/mapping.c')
| -rw-r--r-- | src/nvim/mapping.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/src/nvim/mapping.c b/src/nvim/mapping.c index ff7a3da5c3..5a11ac686e 100644 --- a/src/nvim/mapping.c +++ b/src/nvim/mapping.c @@ -1266,7 +1266,7 @@ int ExpandMappings(regmatch_T *regmatch, int *num_file, char_u ***file) continue; } - if (vim_regexec(regmatch, p, (colnr_T)0)) { + if (vim_regexec(regmatch, (char *)p, (colnr_T)0)) { if (round == 1) { count++; } else { @@ -1289,7 +1289,7 @@ int ExpandMappings(regmatch_T *regmatch, int *num_file, char_u ***file) for (; mp; mp = mp->m_next) { if (mp->m_mode & expand_mapmodes) { p = translate_mapping(mp->m_keys, CPO_TO_CPO_FLAGS); - if (p != NULL && vim_regexec(regmatch, p, (colnr_T)0)) { + if (p != NULL && vim_regexec(regmatch, (char *)p, (colnr_T)0)) { if (round == 1) { count++; } else { @@ -2113,20 +2113,6 @@ void f_mapcheck(typval_T *argvars, typval_T *rettv, FunPtr fptr) get_maparg(argvars, rettv, false); } -void init_default_mappings(void) -{ - add_map("Y", "y$", MODE_NORMAL, false); - - // Use normal! <C-L> to prevent inserting raw <C-L> when using i_<C-O> - // See https://github.com/neovim/neovim/issues/17473 - add_map("<C-L>", "<Cmd>nohlsearch<Bar>diffupdate<Bar>normal! <C-L><CR>", - MODE_NORMAL, false); - add_map("<C-U>", "<C-G>u<C-U>", MODE_INSERT, false); - add_map("<C-W>", "<C-G>u<C-W>", MODE_INSERT, false); - add_map("*", "y/\\\\V<C-R>\"<CR>", MODE_VISUAL, false); - add_map("#", "y?\\\\V<C-R>\"<CR>", MODE_VISUAL, false); -} - /// Add a mapping. Unlike @ref do_map this copies the string arguments, so /// static or read-only strings can be used. /// |