summaryrefslogtreecommitdiff
path: root/lua/telescope/actions/set.lua
diff options
context:
space:
mode:
authoranott03 <amitav_nott@ryecountryday.org>2021-07-14 13:25:00 -0400
committerGitHub <noreply@github.com>2021-07-14 19:25:00 +0200
commitdf579bac425e4b6b69a0c8e694b154610cd5420b (patch)
treefc4eb1bcbeeabe199bd997757bd72892fb4c07a0 /lua/telescope/actions/set.lua
parenta4896e5ef39a8006a8251d48d4cf24aac81a4f94 (diff)
refactor: move from telescope.path to plenary.path (#473)
This will deprecate telescope.path, we will remove it soon. Please move over to plenary.path Co-authored-by: Simon Hauser <Simon-Hauser@outlook.de>
Diffstat (limited to 'lua/telescope/actions/set.lua')
-rw-r--r--lua/telescope/actions/set.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/telescope/actions/set.lua b/lua/telescope/actions/set.lua
index e790e34..855400f 100644
--- a/lua/telescope/actions/set.lua
+++ b/lua/telescope/actions/set.lua
@@ -13,7 +13,7 @@
local a = vim.api
local log = require('telescope.log')
-local path = require('telescope.path')
+local Path = require('plenary.path')
local state = require('telescope.state')
local action_state = require('telescope.actions.state')
@@ -130,7 +130,7 @@ 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.normalize(vim.fn.fnameescape(filename), vim.loop.cwd())
+ filename = Path:new(vim.fn.fnameescape(filename)):normalize(vim.loop.cwd())
vim.cmd(string.format("%s %s", command, filename))
end
end