From 5c284693bfb67805f503462bd1c4852c2f7cd0ff Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Wed, 5 Sep 2018 22:35:06 -0400 Subject: [PATCH 1/2] Fix syntax highlighting --- plugin/gitsessions.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/gitsessions.vim b/plugin/gitsessions.vim index 12967f6..3deb16d 100644 --- a/plugin/gitsessions.vim +++ b/plugin/gitsessions.vim @@ -203,7 +203,7 @@ endfunction augroup gitsessions autocmd! if ! exists("g:gitsessions_disable_auto_load") - autocmd VimEnter * :call g:GitSessionLoad() + autocmd VimEnter * nested :call g:GitSessionLoad() endif autocmd BufEnter * :call g:GitSessionUpdate(0) autocmd VimLeave * :call g:GitSessionUpdate() From 037b9291e8da95b32e38009e6d8e14c37802985b Mon Sep 17 00:00:00 2001 From: Andrew Stewart Date: Wed, 5 Sep 2018 22:36:28 -0400 Subject: [PATCH 2/2] Clear windows and tabs before loading a session --- plugin/gitsessions.vim | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin/gitsessions.vim b/plugin/gitsessions.vim index 3deb16d..78a14ad 100644 --- a/plugin/gitsessions.vim +++ b/plugin/gitsessions.vim @@ -171,6 +171,8 @@ function! g:GitSessionLoad(...) if argc() != 0 return endif + :only + :tabonly let l:show_msg = a:0 > 0 ? a:1 : 0 let l:file = s:session_file(1)