From ebf93395e79e5d026e3867d9e5e158b2bbe1499c Mon Sep 17 00:00:00 2001 From: Simon Hauser Date: Sun, 14 May 2023 22:27:44 +0200 Subject: [PATCH] fix: opening file starting with a plus (#2509) --- lua/telescope/actions/set.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua index bf555fb..4dfe468 100644 --- a/lua/telescope/actions/set.lua +++ b/lua/telescope/actions/set.lua @@ -164,8 +164,8 @@ action_set.edit = function(prompt_bufnr, command) -- check if we didn't pick a different buffer -- prevents restarting lsp server if vim.api.nvim_buf_get_name(0) ~= filename or command ~= "edit" then - filename = Path:new(vim.fn.fnameescape(filename)):normalize(vim.loop.cwd()) - pcall(vim.cmd, string.format("%s %s", command, filename)) + filename = Path:new(filename):normalize(vim.loop.cwd()) + pcall(vim.cmd, string.format("%s %s", command, vim.fn.fnameescape(filename))) end end