From fcd5f1fc035ee3d9832c63a307247c09f25c9cd1 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 4 May 2021 08:46:22 +0200 Subject: [PATCH] fix: files without col/row should be set to col=1 and row=1 #22 --- lua/trouble/providers/qf.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/trouble/providers/qf.lua b/lua/trouble/providers/qf.lua index 7d18ca6f..9f412fdb 100644 --- a/lua/trouble/providers/qf.lua +++ b/lua/trouble/providers/qf.lua @@ -10,8 +10,8 @@ function M.get_list(winid) local ret = {} for _, item in pairs(list.items) do - local row = item.lnum - 1 - local col = item.col - 1 + local row = (item.lnum == 0 and 1 or item.lnum) - 1 + local col = (item.col == 0 and 1 or item.col) - 1 local pitem = { row = row,