mirror of
https://github.com/zoriya/telescope.nvim.git
synced 2026-06-05 03:49:36 +00:00
fix: opening file starting with a plus (#2509)
(cherry picked from commit ebf93395e7)
This commit is contained in:
committed by
Simon Hauser
parent
a49c3aa977
commit
fccfbbb6a6
@@ -158,8 +158,8 @@ action_set.edit = function(prompt_bufnr, command)
|
|||||||
-- check if we didn't pick a different buffer
|
-- check if we didn't pick a different buffer
|
||||||
-- prevents restarting lsp server
|
-- prevents restarting lsp server
|
||||||
if vim.api.nvim_buf_get_name(0) ~= filename or command ~= "edit" then
|
if vim.api.nvim_buf_get_name(0) ~= filename or command ~= "edit" then
|
||||||
filename = Path:new(vim.fn.fnameescape(filename)):normalize(vim.loop.cwd())
|
filename = Path:new(filename):normalize(vim.loop.cwd())
|
||||||
pcall(vim.cmd, string.format("%s %s", command, filename))
|
pcall(vim.cmd, string.format("%s %s", command, vim.fn.fnameescape(filename)))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user