From 229a30c7b4777edada0b0d95aae15c5f3c52f317 Mon Sep 17 00:00:00 2001 From: Artur Smirnov Date: Fri, 19 Jul 2019 12:08:52 +0300 Subject: [PATCH] Add option to enable nested calls for sessions loading --- plugin/gitsessions.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugin/gitsessions.vim b/plugin/gitsessions.vim index 12967f6..310e5d5 100644 --- a/plugin/gitsessions.vim +++ b/plugin/gitsessions.vim @@ -203,7 +203,11 @@ endfunction augroup gitsessions autocmd! if ! exists("g:gitsessions_disable_auto_load") - autocmd VimEnter * :call g:GitSessionLoad() + if exists("g:gitsessions_use_nested_load") + autocmd VimEnter * nested :call g:GitSessionLoad() + else + autocmd VimEnter * :call g:GitSessionLoad() + endif endif autocmd BufEnter * :call g:GitSessionUpdate(0) autocmd VimLeave * :call g:GitSessionUpdate()