We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 36d0174 commit 178ba98Copy full SHA for 178ba98
lua/yazi/keybinding_helpers.lua
@@ -215,7 +215,8 @@ end
215
---@param context YaziActiveContext
216
function YaziOpenerActions.change_working_directory(context)
217
local last_directory = context.ya_process.cwd
218
- if last_directory then
+ or context.input_path:parent().filename
219
+ if last_directory and last_directory ~= vim.fn.getcwd() then
220
vim.notify('cwd changed to "' .. last_directory .. '"')
221
vim.cmd({ cmd = "cd", args = { last_directory } })
222
end
0 commit comments