From 5dca999fd21c261fea34ddeca7bfad2cb531dbce Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 18 Jan 2023 15:11:31 +0100 Subject: distinguish between method call and method response We can not only use the fact that we have a method call inflight with the observed id. Because the language server may has called a method on use with the same id. Therefore we have to also check if the incoming message contains a method field. method + id -> method call id -> method response method -> notification --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 424e1ff..a431e79 100644 --- a/init.lua +++ b/init.lua @@ -914,7 +914,7 @@ end -- for a message response we have a req remembered in the inflight table local function ls_handle_method(ls, method) local req = ls.inflight[method.id] - if req then + if req and not method.method then ls_handle_method_response(ls, method, req) else ls_handle_method_call(ls, method) -- cgit v1.2.3