fix(entry_to_qf): handle nil entry.cwd and absolute filenames (#1058)

This commit is contained in:
bi0ha2ard
2021-08-04 08:56:15 +02:00
committed by GitHub
parent f8caad1d6b
commit b7cd8c7699
2 changed files with 31 additions and 3 deletions

View File

@@ -17,11 +17,10 @@ local p_scroller = require "telescope.pickers.scroller"
local action_state = require "telescope.actions.state"
local action_utils = require "telescope.actions.utils"
local action_set = require "telescope.actions.set"
local from_entry = require "telescope.from_entry"
local transform_mod = require("telescope.actions.mt").transform_mod
local Path = require "plenary.path"
local actions = setmetatable({}, {
__index = function(_, k)
-- TODO(conni2461): Remove deprecated messages
@@ -585,7 +584,7 @@ end
local entry_to_qf = function(entry)
return {
bufnr = entry.bufnr,
filename = Path:new(entry.cwd, entry.filename):absolute(),
filename = from_entry.path(entry, false),
lnum = entry.lnum,
col = entry.col,
text = entry.text or entry.value.text or entry.value,