Skip to content

Commit

Permalink
fix: files without col/row should be set to col=1 and row=1 #22
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed May 4, 2021
1 parent ad0bd52 commit fcd5f1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/trouble/providers/qf.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit fcd5f1f

Please sign in to comment.