We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6e4f775 commit eac4855Copy full SHA for eac4855
lua/null-ls/helpers/diagnostics.lua
@@ -68,7 +68,7 @@ local make_diagnostic = function(entries, defaults, attr_adapters, params, offse
68
-- we need to convert the column number to a byte index.
69
-- See: https://github.com/nvimtools/none-ls.nvim/issues/19#issuecomment-1820127436
70
if entries["col"] ~= nil and content_line ~= nil then
71
- local col = tonumber(entries["col"]) or (1 / 0)
+ local col = tonumber(entries["col"]) or math.huge
72
col = math.min(col, string.len(content_line))
73
local byte_index_col = vim.str_byteindex(content_line, col)
74
entries["col"] = tostring(byte_index_col)
0 commit comments