diff --git a/lua/overseer/component/on_result_diagnostics.lua b/lua/overseer/component/on_result_diagnostics.lua index e084aa3..f7003c8 100644 --- a/lua/overseer/component/on_result_diagnostics.lua +++ b/lua/overseer/component/on_result_diagnostics.lua @@ -68,7 +68,7 @@ local comp = { message = item.text, severity = type_to_severity[item.type] or vim.diagnostic.severity.ERROR, lnum = (item.lnum or 1) - 1, - end_lnum = item.end_lnum and (item.end_lnum - 1), + end_lnum = (item.end_lnum and item.end_lnum > 0) and (item.end_lnum - 1) or item.lnum, col = item.col or 0, end_col = item.end_col, source = task.name,