nvim: plugin/session: Do not load session if Quickfix list is loaded

This is required if we want to use git-jump or do anything with `nvim -q`.
This commit is contained in:
Sanchayan Maity 2023-05-15 16:23:59 +05:30
parent 9fc6d0eb2a
commit 245855e5ff
Signed by: sanchayanmaity
GPG Key ID: 6F6A0609C12038F3
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ function! s:SessionLoad()
" - neovim is started with arguments
" - neovim is opened outside a git repository
" - neovim is in pager mode and is getting input from STDIN
if (argc(-1) > 0 || fugitive#Head() == '' || g:session_in_pager_mode == 1)
" - neovim is opened with nvim -q
if (argc(-1) > 0 || fugitive#Head() == '' || g:session_in_pager_mode == 1 || (!empty(getqflist())))
return
endif