Invoke redraw if pum is beeing visible

This commit is contained in:
hrsh7th
2021-09-03 20:40:19 +09:00
parent 889109cbc0
commit 157390d2c1

View File

@@ -266,7 +266,15 @@ core.filter = async.throttle(function()
end
end
local prev = core.menu:get_first_entry()
core.menu:update(ctx, core.get_sources())
local next = core.menu:get_first_entry()
local prev_word = prev and prev:get_word()
local next_word = next and next:get_word()
if prev_word ~= next_word then
vim.cmd [[redraw!]]
end
end, 50)
---Confirm completion.