From e30e02d51f80b0d48e85fcc110d907ae4a6cbccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 30 Apr 2021 17:55:10 +0800 Subject: fix completion: details may be suspended --- script/core/completion.lua | 4 +--- script/provider/provider.lua | 2 ++ 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'script') diff --git a/script/core/completion.lua b/script/core/completion.lua index 6ee4d61d..98a9250f 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -48,9 +48,7 @@ local function resolveStack(id) return nil end - -- 当进行新的 resolve 时,放弃当前的 resolve - await.close('completion.resolve') - return await.await(callback, 'completion.resolve') + return callback() end local function trim(str) diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 65993940..a6f4d9cc 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -550,6 +550,8 @@ proto.on('completionItem/resolve', function (item) if not item.data then return item end + await.close 'completion.resolve' + await.setID 'completion.resolve' local id = item.data.id local uri = item.data.uri --await.setPriority(1000) -- cgit v1.2.3