Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
glepnir committed Feb 6, 2025
1 parent 346be46 commit 0eeeff1
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions lua/dired/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,22 @@ Browser.setup = function(state)
})
end,
},
{
key = { i = SEPARATOR },
action = function()
local search_path = PathOps.getSearchPath(state) .. SEPARATOR
if PathOps.isDirectory(search_path) then
state.current_path = search_path
return Browser.refresh(state, state.current_path).run()
end

local lnum = api.nvim_win_get_cursor(state.search_win)[1]
vim.fn.prompt_setprompt(state.search_buf, search_path)
api.nvim_buf_set_extmark(state.search_buf, ns_id, lnum, 0, {
line_hl_group = 'DiredPrompt',
})
end,
},
}

local nmap = function(map)
Expand Down

0 comments on commit 0eeeff1

Please sign in to comment.