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:
parent
704dd5d63c
commit
1da465eedf
1 changed files with 4 additions and 2 deletions
|
|
@ -52,8 +52,10 @@ endf
|
|||
augroup NimVim
|
||||
au!
|
||||
au BufEnter log://nim call s:UpdateNimLog()
|
||||
if has("python3") || has("python")
|
||||
" au QuitPre * :py nimTerminateAll()
|
||||
au VimLeavePre * :py nimTerminateAll()
|
||||
endif
|
||||
augroup END
|
||||
|
||||
command! NimLog :e log://nim
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue