Skip to content

Commit

Permalink
fix(telescope): use (lnum, 0) for telescope item without col (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
FeiyouG committed Jun 29, 2024
1 parent 4d566a3 commit 25204b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/trouble/sources/telescope.lua
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ function M.item(item)
filename = item.cwd .. "/" .. filename
end
end
local word = item.text and item.text:sub(item.col):match("%S+")
local pos = (item.lnum and item.col) and { item.lnum, item.col - 1 } or nil
local word = item.text and item.col and item.text:sub(item.col):match("%S+")
local pos = item.lnum and { item.lnum, item.col and item.col - 1 or 0 } or nil
return Item.new({
source = "telescope",
buf = item.bufnr,
Expand Down

0 comments on commit 25204b7

Please sign in to comment.