feat(dir.lua): global "-" default mapping #40426

This commit is contained in:
Barrett Ruth
2026-06-26 05:17:00 -05:00
committed by GitHub
parent ea0af59854
commit 6576e75eeb
4 changed files with 23 additions and 1 deletions

View File

@@ -144,6 +144,18 @@ describe('nvim.dir', function()
assert_directory(root)
end)
it('maps - to open the parent directory of the current file', function()
make_fixture()
n.clear({ args_rm = { '-u' } })
edit(file)
feed('-')
poke_eventloop()
assert_directory(root)
line_of('alpha.txt')
end)
it('uses an absolute buffer name for a relative startup directory argument', function()
if t.is_zig_build() then
return pending('broken with build.zig relative runtime paths after chdir')