From 4b4db1ff7dbedc95975c3bd2a2ba8d2bdf5d6c46 Mon Sep 17 00:00:00 2001 From: Ryan Blonna Date: Sun, 22 Jan 2023 19:19:49 +1100 Subject: [PATCH] fix: escape filename used in drop commands (#2339) --- lua/telescope/actions/set.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua index 11d379b..6e12907 100644 --- a/lua/telescope/actions/set.lua +++ b/lua/telescope/actions/set.lua @@ -83,7 +83,7 @@ do if command ~= "drop" and command ~= "tab drop" then vim.cmd(string.format("%s %d", command, bufnr)) else - vim.cmd(string.format("%s %s", command, vim.api.nvim_buf_get_name(bufnr))) + vim.cmd(string.format("%s %s", command, vim.fn.fnameescape(vim.api.nvim_buf_get_name(bufnr)))) end end end