fix(dir): user/plugin can override default "-" mapping #40676

This commit is contained in:
Barrett Ruth
2026-07-10 10:52:24 -05:00
committed by GitHub
parent 6a8bb2d62f
commit 20a4b1bc5e
3 changed files with 18 additions and 13 deletions

View File

@@ -129,13 +129,6 @@ do
--- See |&-default|
vim.keymap.set('n', '&', ':&&<CR>', { desc = ':help &-default' })
vim.keymap.set('n', '-', function()
if vim.fn.maparg('<Plug>(nvim-dir-up)', 'n') ~= '' then
return '<Plug>(nvim-dir-up)'
end
return (vim.v.count == 0 and '' or vim.v.count) .. '-'
end, { expr = true, silent = true, desc = 'Open parent directory' })
--- Use Q in Visual mode to execute a macro on each line of the selection. #21422
--- This only make sense in linewise Visual mode. #28287
---