From cc21a61910b89422122cc0c67a8265247bd0db6a Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Fri, 24 Sep 2021 16:35:28 +0900 Subject: [PATCH] Fix timing problem for some of the snippet engine Fixes #236 --- lua/cmp/core.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/cmp/core.lua b/lua/cmp/core.lua index 79cd72e..0af87d7 100644 --- a/lua/cmp/core.lua +++ b/lua/cmp/core.lua @@ -383,7 +383,7 @@ core.confirm = function(e, option, callback) insert_text_mode = completion_item.insertTextMode, }) end - e:execute(function() + e:execute(vim.schedule_wrap(function() suspending() if config.get().event.on_confirm_done then @@ -392,7 +392,7 @@ core.confirm = function(e, option, callback) if callback then callback() end - end) + end)) end) end) end)