fix: skip path escaping when adding items to quickfix list (#1712)
This commit is contained in:
@@ -623,7 +623,7 @@ local entry_to_qf = function(entry)
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
bufnr = entry.bufnr,
|
bufnr = entry.bufnr,
|
||||||
filename = from_entry.path(entry, false),
|
filename = from_entry.path(entry, false, false),
|
||||||
lnum = vim.F.if_nil(entry.lnum, 1),
|
lnum = vim.F.if_nil(entry.lnum, 1),
|
||||||
col = vim.F.if_nil(entry.col, 1),
|
col = vim.F.if_nil(entry.col, 1),
|
||||||
text = text,
|
text = text,
|
||||||
|
|||||||
@@ -10,8 +10,15 @@ This will provide standard mechanism for accessing information from an entry.
|
|||||||
|
|
||||||
local from_entry = {}
|
local from_entry = {}
|
||||||
|
|
||||||
function from_entry.path(entry, validate)
|
function from_entry.path(entry, validate, escape)
|
||||||
local path = entry.path and vim.fn.fnameescape(entry.path) or nil
|
escape = vim.F.if_nil(escape, true)
|
||||||
|
local path
|
||||||
|
if escape then
|
||||||
|
path = entry.path and vim.fn.fnameescape(entry.path) or nil
|
||||||
|
else
|
||||||
|
path = entry.path
|
||||||
|
end
|
||||||
|
|
||||||
if path == nil then
|
if path == nil then
|
||||||
path = entry.filename
|
path = entry.filename
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user