From 6cf1a0f7ba8183a0868b7d3f2a3f86795cc5c61a Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Tue, 19 Nov 2024 21:03:22 +0000 Subject: Fix overrun on diagnostic text objects --- lua/diagnostic_objects.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/diagnostic_objects.lua b/lua/diagnostic_objects.lua index f0fbf97..c914c70 100644 --- a/lua/diagnostic_objects.lua +++ b/lua/diagnostic_objects.lua @@ -81,7 +81,7 @@ local function normalize_position(diag) local elnum = math.max(diag.end_lnum + 1, lnum) local col = math.max(diag.col, 0) - local ecol = diag.end_col + local ecol = math.max(diag.end_col - 1, 0) if elnum == lnum then ecol = math.max(col, ecol) -- cgit