From 58d7c8d1783dbe2ea145b235766ae66d718542c6 Mon Sep 17 00:00:00 2001 From: kiyan Date: Fri, 4 Jun 2021 08:25:13 +0200 Subject: [PATCH] fix: use fnameescape to escape the path for use in cmds INFO: could potentially lead to issues, might need to revert --- lua/nvim-tree/utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-tree/utils.lua b/lua/nvim-tree/utils.lua index 21060b96..a18b4798 100644 --- a/lua/nvim-tree/utils.lua +++ b/lua/nvim-tree/utils.lua @@ -3,7 +3,7 @@ local uv = vim.loop local api = vim.api function M.path_to_matching_str(path) - return path:gsub('(%-)', '(%%-)'):gsub('(%.)', '(%%.)'):gsub('(%_)', '(%%_)') + return vim.fn.fnameescape(path) end function M.echo_warning(msg)