Skip to content

Commit

Permalink
fix: jump to diagnostic with v.col is nil (#1358)
Browse files Browse the repository at this point in the history
Co-authored-by: tknightz <[email protected]>
  • Loading branch information
tknightz and tknightz authored Dec 5, 2023
1 parent e9f0895 commit 165d896
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/lspsaga/diagnostic/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ function diag:get_diagnostic(opt)
if opt.cursor then
local res = {}
for _, v in pairs(entrys) do
if v.col == nil then
v.col = col
end
if v.col <= col and (v.end_col and v.end_col > col or true) then
res[#res + 1] = v
end
Expand Down

0 comments on commit 165d896

Please sign in to comment.