From df579bac425e4b6b69a0c8e694b154610cd5420b Mon Sep 17 00:00:00 2001 From: anott03 Date: Wed, 14 Jul 2021 13:25:00 -0400 Subject: 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 --- lua/telescope/actions/set.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lua/telescope/actions/set.lua') 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 -- cgit v1.2.3