fix: from_entry escape and validation (#2058)

This commit is contained in:
Simon Hauser
2022-07-10 21:28:22 +02:00
committed by GitHub
parent 524c4eb7fb
commit 10a3310546
3 changed files with 14 additions and 18 deletions

View File

@@ -415,11 +415,11 @@ previewers.cat = defaulter(function(opts)
return previewers.new_buffer_previewer {
title = "File Preview",
dyn_title = function(_, entry)
return Path:new(from_entry.path(entry, true)):normalize(cwd)
return Path:new(from_entry.path(entry, false, false)):normalize(cwd)
end,
get_buffer_by_name = function(_, entry)
return from_entry.path(entry, true)
return from_entry.path(entry, false)
end,
define_preview = function(self, entry, status)
@@ -454,11 +454,11 @@ previewers.vimgrep = defaulter(function(opts)
return previewers.new_buffer_previewer {
title = "Grep Preview",
dyn_title = function(_, entry)
return Path:new(from_entry.path(entry, true)):normalize(cwd)
return Path:new(from_entry.path(entry, false, false)):normalize(cwd)
end,
get_buffer_by_name = function(_, entry)
return from_entry.path(entry, true)
return from_entry.path(entry, false)
end,
define_preview = function(self, entry, status)