Skip to content

Commit

Permalink
fix(folder_browser): disable path_separator action (#333)
Browse files Browse the repository at this point in the history
The `path_separator` action working in the `folder_browser` is probably
not the expected behavior since path separators are valid (and arguably
common) tokens for searches in this mode.
  • Loading branch information
jamestrew authored Nov 12, 2023
1 parent 3044ff9 commit da2a20c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/telescope/_extensions/file_browser/actions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ fb_actions.path_separator = function(prompt_bufnr)
local current_picker = action_state.get_current_picker(prompt_bufnr)
local dir = Path:new(current_picker.finder.path .. os_sep .. current_picker:_get_prompt() .. os_sep)

if dir:exists() and dir:is_dir() then
if current_picker.finder.files and dir:exists() and dir:is_dir() then
fb_actions.open_dir(prompt_bufnr, dir.filename)
else
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(os_sep, true, false, true), "tn", false)
Expand Down

0 comments on commit da2a20c

Please sign in to comment.