File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -165,11 +165,13 @@ M.setup = function(user_opts)
165165 vim .notify (" no session to autoload" , vim .log .levels .WARN , { title = notification_title })
166166 return nil
167167 elseif # sessions_in_cwd == 1 or not user_config .autoprompt then
168- vim .cmd .source (user_config .sessions .sessions_path .. sessions_in_cwd [1 ])
169- vim .g [user_config .sessions .sessions_variable ] = vim .fs .basename (sessions_in_cwd [1 ])
170- if type (user_config .post_hook ) == " function" then
171- user_config .post_hook ()
172- end
168+ vim .schedule (function ()
169+ vim .cmd .source (user_config .sessions .sessions_path .. sessions_in_cwd [1 ])
170+ vim .g [user_config .sessions .sessions_variable ] = vim .fs .basename (sessions_in_cwd [1 ])
171+ if type (user_config .post_hook ) == " function" then
172+ user_config .post_hook ()
173+ end
174+ end )
173175 return nil
174176 end
175177 end
You can’t perform that action at this time.
0 commit comments