mirror of
https://github.com/neovim/neovim.git
synced 2025-09-08 12:28:18 +00:00
@@ -271,8 +271,12 @@ local function set_diagnostic_cache(diagnostics, bufnr, client_id)
|
|||||||
end
|
end
|
||||||
-- Account for servers that place diagnostics on terminating newline
|
-- Account for servers that place diagnostics on terminating newline
|
||||||
if buf_line_count > 0 then
|
if buf_line_count > 0 then
|
||||||
local start = diagnostic.range.start
|
diagnostic.range.start.line = math.min(
|
||||||
start.line = math.min(start.line, buf_line_count - 1)
|
diagnostic.range.start.line, buf_line_count - 1
|
||||||
|
)
|
||||||
|
diagnostic.range["end"].line = math.min(
|
||||||
|
diagnostic.range["end"].line, buf_line_count - 1
|
||||||
|
)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user