Skip to content

Sort diagnostics by column number in quickfix list #21456

@tae-soo-kim

Description

@tae-soo-kim

Feature already in Vim?

No response

Feature description

Diagnostics may contain column numbers. But currently neovim doesn't know about columns and displays them out of order when converted to a quickfix list. The problem is within this function:

table.sort(list, function(a, b)
if a.bufnr == b.bufnr then
return a.lnum < b.lnum
else
return a.bufnr < b.bufnr
end
end)

A further test a.col < b.col is necessary when both bufnr and lnum compare equal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity:lowLow-risk, self-contained. Do NOT ask "can I work on this", just read CONTRIBUTING.mddiagnostic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions