fix(lsp): convert range to byte index before highlighting (#16218)

Co-authored-by: Mathias Fußenegger <mfussenegger@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
This commit is contained in:
elianiva
2021-11-07 05:05:52 +07:00
committed by GitHub
parent 77c54fc995
commit b74916cfd2
2 changed files with 25 additions and 8 deletions

View File

@@ -349,7 +349,7 @@ M['textDocument/signatureHelp'] = M.signature_help
--see: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentHighlight
M['textDocument/documentHighlight'] = function(_, result, ctx, _)
if not result then return end
util.buf_highlight_references(ctx.bufnr, result)
util.buf_highlight_references(ctx.bufnr, result, ctx.client_id)
end
---@private