feat(session): skip session restore on startup with file arguments
This commit is contained in:
1 parent
d9a7970d3e
commit
aee8fe3b2d
2 files changed
+8
-6
No files matched your search
@@ -169,10 +169,8 @@ return {
|
||||
event = "VimEnter",
|
||||
desc = "Restore worktree/branch session, else open the git files picker",
|
||||
nested = true, -- trigger other autocommands as buffers open
|
||||
callback = function()
|
||||
-- only when nvim was started without file arguments
|
||||
if vim.fn.argc(-1) == 0 then require("config.session").restore() end
|
||||
end,
|
||||
-- no-op when nvim was started with file arguments, see config.session
|
||||
callback = function() require("config.session").restore() end,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user