Check for python support before queuing autocmd

Versions of Vim compiled without python support will error when attempting
to run `:py nimTerminateAll()`, a autocommand for the `VimLeavePre` event.
A simple check for python support prevents this.
This commit is contained in:
Tom Harley 2018-07-31 16:37:35 +01:00
commit 1da465eedf

View file

@ -52,8 +52,10 @@ endf
augroup NimVim augroup NimVim
au! au!
au BufEnter log://nim call s:UpdateNimLog() au BufEnter log://nim call s:UpdateNimLog()
" au QuitPre * :py nimTerminateAll() if has("python3") || has("python")
au VimLeavePre * :py nimTerminateAll() " au QuitPre * :py nimTerminateAll()
au VimLeavePre * :py nimTerminateAll()
endif
augroup END augroup END
command! NimLog :e log://nim command! NimLog :e log://nim