Skip to content

Commit ec66ebb

Browse files
fix: change wrong else condition for autoprompt
1 parent cc0ceef commit ec66ebb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ After loading a session you may want to specify additional actions to run that m
193193
require("nvim-possession").setup({
194194
post_hook = function()
195195
require("FTerm").open()
196-
require('nvim-tree').toggle(false, true)
196+
require("nvim-tree.api").tree.toggle()
197197
vim.lsp.buf.format()
198198
end
199199
})

lua/nvim-possession/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ M.setup = function(user_opts)
164164
if next(sessions_in_cwd) == nil then
165165
vim.notify("no session to autoload", vim.log.levels.WARN, { title = notification_title })
166166
return nil
167-
elseif #sessions_in_cwd == 1 or user_config.autoprompt then
167+
elseif #sessions_in_cwd == 1 or not user_config.autoprompt then
168168
vim.cmd.source(user_config.sessions.sessions_path .. sessions_in_cwd[1])
169169
vim.g[user_config.sessions.sessions_variable] = vim.fs.basename(sessions_in_cwd[1])
170170
if type(user_config.post_hook) == "function" then

0 commit comments

Comments
 (0)