Prevent duplication of InsertLeave autocmds in buffers (#582)

This commit is contained in:
Tommy Allen
2016-06-11 18:35:09 -04:00
committed by Daniel Hahler
parent 8334e505b3
commit 70360437cd
2 changed files with 5 additions and 1 deletions

View File

@@ -49,5 +49,6 @@ Daniel Hahler (@blueyed)
Dave Honneffer (@pearofducks)
Bagrat Aznauryan (@n9code)
Tomoyuki Kashiro (@kashiro)
Tommy Allen (@tweekmonster)
@something are github user names.

View File

@@ -43,6 +43,9 @@ if g:jedi#auto_initialization
if g:jedi#auto_close_doc
" close preview if its still open after insert
autocmd InsertLeave <buffer> if pumvisible() == 0|pclose|endif
augroup jedi_preview
autocmd!
autocmd InsertLeave <buffer> if pumvisible() == 0|pclose|endif
augroup END
endif
endif