aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2023-01-18 15:11:31 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2023-01-18 15:11:31 +0100
commit5dca999fd21c261fea34ddeca7bfad2cb531dbce (patch)
treeee691e575634e4e1d96d5675452fd7fe42c254f2
parent6b5676791531a6b465661430077997f41caf84d8 (diff)
downloadvis-lspc-5dca999fd21c261fea34ddeca7bfad2cb531dbce.tar.gz
vis-lspc-5dca999fd21c261fea34ddeca7bfad2cb531dbce.zip
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
-rw-r--r--init.lua2
1 files changed, 1 insertions, 1 deletions
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)