fix: prevent autoloading when there are extra command line arguments passed to nvim (#76)
When nvim is used as a man pager with `export MANPAGER='nvim +Man! '`, with autoload set to true, persisted.nvim still autoloads the current directory which is not desirablemain
parent
c384aa6706
commit
975cd4cd06
|
|
@ -113,7 +113,7 @@ end
|
||||||
---@return nil
|
---@return nil
|
||||||
function M.autoload()
|
function M.autoload()
|
||||||
-- Ensure that no arguments have been passed to Neovim
|
-- Ensure that no arguments have been passed to Neovim
|
||||||
if config.options.autoload and vim.fn.argc() == 0 then
|
if config.options.autoload and vim.fn.argc() == 0 and #vim.v.argv < 3 then
|
||||||
if allow_dir() and not ignore_dir() then
|
if allow_dir() and not ignore_dir() then
|
||||||
M.load()
|
M.load()
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue