diff options
Diffstat (limited to 'runtime/lua')
| -rw-r--r-- | runtime/lua/vim/diagnostic.lua | 7 | 
1 files changed, 2 insertions, 5 deletions
| diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index 59cb9f8c5b..adf941cbbf 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -272,6 +272,8 @@ end  ---@private  local function set_diagnostic_cache(namespace, bufnr, diagnostics)    for _, diagnostic in ipairs(diagnostics) do +    assert(diagnostic.lnum, "Diagnostic line number is required") +    assert(diagnostic.col, "Diagnostic column is required")      diagnostic.severity = diagnostic.severity and to_severity(diagnostic.severity) or M.severity.ERROR      diagnostic.end_lnum = diagnostic.end_lnum or diagnostic.lnum      diagnostic.end_col = diagnostic.end_col or diagnostic.col @@ -297,11 +299,6 @@ local function restore_extmarks(bufnr, last)        if not found[extmark[1]] then          local opts = extmark[4]          opts.id = extmark[1] -        -- HACK: end_row should be end_line -        if opts.end_row then -          opts.end_line = opts.end_row -          opts.end_row = nil -        end          pcall(vim.api.nvim_buf_set_extmark, bufnr, ns, extmark[2], extmark[3], opts)        end      end | 
