Use <C-h> and support cmdwin

This commit is contained in:
hrsh7th
2021-10-10 00:01:15 +09:00
parent 339fe9177b
commit 883eee5bbc
5 changed files with 15 additions and 8 deletions

View File

@@ -290,7 +290,7 @@ end
misc.set(_G, { 'cmp', 'view', 'custom_entries_view', '_insert', 'remove' }, function(offset)
local cursor = vim.api.nvim_win_get_cursor(0)
local length = vim.str_utfindex(string.sub(vim.api.nvim_get_current_line(), offset, cursor[2]))
return keymap.t(string.rep('<C-g>U<Left><Del>', length))
return keymap.t(string.rep('<C-h>', length))
end)
return custom_entries_view