Skip to content

Commit

Permalink
fix telescope open_using
Browse files Browse the repository at this point in the history
  • Loading branch information
jamestrew committed May 14, 2023
1 parent ffbbffe commit 94c2ab9
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions lua/plugins/telescope/utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,8 @@ end
M.open_using = function(finder)
return function(prompt_bufnr)
local current_finder = action_state.get_current_picker(prompt_bufnr).finder
local entry = action_state.get_selected_entry()

local entry_path
if entry.ordinal == ".." then
entry_path = Path:new(current_finder.path)
else
entry_path = action_state.get_selected_entry().Path
end

local path = entry_path:is_dir() and entry_path:absolute() or entry_path:parent():absolute()
actions.close(prompt_bufnr)
finder({ cwd = path })
finder({ cwd = current_finder.path })
end
end

Expand Down

0 comments on commit 94c2ab9

Please sign in to comment.