mirror of
https://github.com/neovim/neovim.git
synced 2026-03-28 03:12:00 +00:00
fix(lsp): vim.Range check in document_color.color_presentation() (#38374)
Problem: `vim.lsp.document_color.color_presentation()` throws, due to incorrect use of the `vim.Range` API. Solution: Change `vim.Range.has(a, b)` call to `a:has(b)`.
This commit is contained in:
@@ -306,7 +306,7 @@ local function get_hl_info_under_cursor(provider)
|
||||
|
||||
for client_id, state in pairs(provider.client_state) do
|
||||
for _, hl in ipairs(state.hl_info) do
|
||||
if vim.Range.has(hl.range, cursor_pos) then
|
||||
if hl.range:has(cursor_pos) then
|
||||
return hl, client_id
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user