summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
authorAlessandro Martini <alessandrofmartini@gmail.com>2020-12-11 00:46:39 -0300
committerGitHub <noreply@github.com>2020-12-10 22:46:39 -0500
commit62b8655f1532d92245a50ac387201f2d1ac616e1 (patch)
tree665afb98af120045bbda9d7680ee817f05864fed /lua
parent77e8125ef55557fab75598d33503f7ba73078023 (diff)
fix: fix non escaped bat theme (#319)
When a bat theme contained spaces it would crash the bat previewer as described in #318.
Diffstat (limited to 'lua')
-rw-r--r--lua/telescope/previewers.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/telescope/previewers.lua b/lua/telescope/previewers.lua
index 4616780..5d64d04 100644
--- a/lua/telescope/previewers.lua
+++ b/lua/telescope/previewers.lua
@@ -154,7 +154,7 @@ local bat_maker = function(filename, lnum, start, finish)
end
if theme ~= nil then
- table.insert(command, { "--theme", string.format("%s", theme) })
+ table.insert(command, { "--theme", string.format("%s", vim.fn.shellescape(theme)) })
end
return flatten {