refactor(map): simplify add_map params

This commit is contained in:
bfredl
2022-06-22 17:39:30 +02:00
parent e0f605bfd8
commit 83170a4986
3 changed files with 21 additions and 23 deletions

View File

@@ -6645,8 +6645,8 @@ static int open_cmdwin(void)
const int histtype = hist_char2type(cmdwin_type);
if (histtype == HIST_CMD || histtype == HIST_DEBUG) {
if (p_wc == TAB) {
add_map((char_u *)"<buffer> <Tab> <C-X><C-V>", MODE_INSERT, false);
add_map((char_u *)"<buffer> <Tab> a<C-X><C-V>", MODE_NORMAL, false);
add_map("<Tab>", "<C-X><C-V>", MODE_INSERT, true);
add_map("<Tab>", "a<C-X><C-V>", MODE_NORMAL, true);
}
set_option_value("ft", 0L, "vim", OPT_LOCAL);
}