mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
fix(diagnostic): sort diagnostics by column (#21457)
Sort diagnostics by column number in quickfix list
This commit is contained in:
parent
6b3ae24a70
commit
bf9ad5db96
@ -1673,7 +1673,11 @@ function M.toqflist(diagnostics)
|
||||
end
|
||||
table.sort(list, function(a, b)
|
||||
if a.bufnr == b.bufnr then
|
||||
return a.lnum < b.lnum
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user