mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-08 05:01:06 +00:00
fix(previewer): don't escape paths for fs_stat (#2996)
`vim.loop.fs_stat` takes file paths literally so no escaping special
characters are need (eg spaces, `$`, etc)
(cherry picked from commit 221778e93b)
This commit is contained in:
@@ -425,11 +425,11 @@ previewers.cat = defaulter(function(opts)
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
get_buffer_by_name = function(_, entry)
|
get_buffer_by_name = function(_, entry)
|
||||||
return from_entry.path(entry, false)
|
return from_entry.path(entry, false, false)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
define_preview = function(self, entry, status)
|
define_preview = function(self, entry, status)
|
||||||
local p = from_entry.path(entry, true)
|
local p = from_entry.path(entry, true, false)
|
||||||
if p == nil or p == "" then
|
if p == nil or p == "" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -465,7 +465,7 @@ previewers.vimgrep = defaulter(function(opts)
|
|||||||
end,
|
end,
|
||||||
|
|
||||||
get_buffer_by_name = function(_, entry)
|
get_buffer_by_name = function(_, entry)
|
||||||
return from_entry.path(entry, false)
|
return from_entry.path(entry, false, false)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
define_preview = function(self, entry, status)
|
define_preview = function(self, entry, status)
|
||||||
@@ -476,7 +476,7 @@ previewers.vimgrep = defaulter(function(opts)
|
|||||||
or false
|
or false
|
||||||
local p
|
local p
|
||||||
if not has_buftype then
|
if not has_buftype then
|
||||||
p = from_entry.path(entry, true)
|
p = from_entry.path(entry, true, false)
|
||||||
if p == nil or p == "" then
|
if p == nil or p == "" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@@ -889,7 +889,7 @@ previewers.git_file_diff = defaulter(function(opts)
|
|||||||
|
|
||||||
define_preview = function(self, entry, status)
|
define_preview = function(self, entry, status)
|
||||||
if entry.status and (entry.status == "??" or entry.status == "A ") then
|
if entry.status and (entry.status == "??" or entry.status == "A ") then
|
||||||
local p = from_entry.path(entry, true)
|
local p = from_entry.path(entry, true, false)
|
||||||
if p == nil or p == "" then
|
if p == nil or p == "" then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user