fix(dir): open CWD from unnamed buffer with - mapping #40926

This commit is contained in:
Barrett Ruth
2026-07-24 03:45:13 -07:00
committed by GitHub
parent 66441e549d
commit ce9cc43f23
2 changed files with 41 additions and 0 deletions

View File

@@ -47,6 +47,10 @@ end
---@param path string
function M.open_parent_path(path)
if path == '' then
navigate('.')
return
end
path = M.normalize(path)
navigate(fs.dirname(path), { name = fs.basename(path), dir = vim.fn.isdirectory(path) == 1 })
end