Skip to content

Commit

Permalink
fix accs
Browse files Browse the repository at this point in the history
  • Loading branch information
ms-jpq committed Oct 22, 2024
1 parent 70a6f40 commit db12581
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lua/coq/lsp-request.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
end

local cids = {}
local acc = {}
local accs = {}

COQ.lsp_pull = function(client, name, uid, lo, hi)
vim.validate {
Expand All @@ -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]
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit db12581

Please sign in to comment.