Skip to content

Commit

Permalink
Do not check for digits in request.id (#572)
Browse files Browse the repository at this point in the history
  • Loading branch information
julien authored Nov 11, 2024
1 parent e34c17e commit 41c73ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions autoload/lsp/lspserver.vim
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,9 @@ enddef

# send a response message to the server
def SendResponse(lspserver: dict<any>, request: dict<any>, result: any, error: dict<any>)
if (request.id->type() == v:t_string
&& (request.id->trim() =~ '[^[:digit:]]\+'
|| request.id->trim()->empty()))
if (request.id->type() == v:t_string && request.id->trim()->empty())
|| (request.id->type() != v:t_string && request.id->type() != v:t_number)
util.ErrMsg('request.id of response to LSP server is not a correct number')
util.ErrMsg('request.id of response to LSP server must be a number or a string')
return
endif
var resp: dict<any> = lspserver.createResponse(
Expand Down

0 comments on commit 41c73ec

Please sign in to comment.