Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not check for digits in request.id #572

Merged
merged 1 commit into from
Nov 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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