From db12581bea4e83b8d8142c15daa9632d796636cf Mon Sep 17 00:00:00 2001 From: dogisgreat Date: Tue, 22 Oct 2024 09:49:41 -0400 Subject: [PATCH] fix accs --- lua/coq/lsp-request.lua | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lua/coq/lsp-request.lua b/lua/coq/lsp-request.lua index 952865c9..b55e27f8 100644 --- a/lua/coq/lsp-request.lua +++ b/lua/coq/lsp-request.lua @@ -32,7 +32,7 @@ end local cids = {} - local acc = {} + local accs = {} COQ.lsp_pull = function(client, name, uid, lo, hi) vim.validate { @@ -46,7 +46,7 @@ return {} end - local items = acc[client] or {} + local items = (accs[name] or {})[client] or {} local a = {} for i = lo, hi do local item = items[i] @@ -75,14 +75,15 @@ if multipart then if uid > (cids[name] or -1) then - acc = {} + accs[name] = {} end if type(reply) == "table" then + accs[name] = accs[name] or {} if type(reply.items) == "table" then - acc[client] = reply.items + accs[name][client] = reply.items reply.items = {} else - acc[client] = reply + accs[name][client] = reply payload.reply = {} end end