Reduce use of VimL (#168)

* perf(context): reduce use of `cmd` and `fn`

* perf(float): reduce use of `cmd` and `fn`

* perf(init): reduce use of `cmd` and `fn`

* perf(menu): reduce use of `cmd` and `fn`

* perf(plugin): reduce use of `cmd` and `fn`

* docs(README): reduce use of `cmd` and `fn`
This commit is contained in:
Iron-E
2021-09-08 22:12:22 -04:00
committed by GitHub
parent 29679d493b
commit ae54dcdc49
6 changed files with 22 additions and 20 deletions

View File

@@ -63,7 +63,7 @@ end
---Select next item if possible
cmp.select_next_item = function()
if vim.fn.pumvisible() == 1 then
vim.fn.feedkeys(keymap.t('<C-n>'), 'n')
vim.api.nvim_feedkeys(keymap.t('<C-n>'), 'n', true)
return true
else
return false
@@ -73,7 +73,7 @@ end
---Select prev item if possible
cmp.select_prev_item = function()
if vim.fn.pumvisible() == 1 then
vim.fn.feedkeys(keymap.t('<C-p>'), 'n')
vim.api.nvim_feedkeys(keymap.t('<C-p>'), 'n', true)
return true
else
return false