diff --git a/runtime/lua/vim/diagnostic.lua b/runtime/lua/vim/diagnostic.lua index 8ae4eda3b7..81862988fc 100644 --- a/runtime/lua/vim/diagnostic.lua +++ b/runtime/lua/vim/diagnostic.lua @@ -666,7 +666,9 @@ local function get_logical_pos(diagnostic) diagnostic._extmark_id, { details = true } ) - + if next(extmark) == nil then + return diagnostic.lnum, diagnostic.col, diagnostic.end_lnum, diagnostic.end_col, true + end return extmark[1], extmark[2], extmark[3].end_row, extmark[3].end_col, not extmark[3].invalid end