mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 03:18:16 +00:00
fix(diagnostic): sort diagnostics by column (#21457)
Sort diagnostics by column number in quickfix list
This commit is contained in:
@@ -1673,7 +1673,11 @@ function M.toqflist(diagnostics)
|
||||
end
|
||||
table.sort(list, function(a, b)
|
||||
if a.bufnr == b.bufnr then
|
||||
if a.lnum == b.lnum then
|
||||
return a.col < b.col
|
||||
else
|
||||
return a.lnum < b.lnum
|
||||
end
|
||||
else
|
||||
return a.bufnr < b.bufnr
|
||||
end
|
||||
|
Reference in New Issue
Block a user