Fix deoplete preview window closing

This commit is contained in:
ViViDboarder 2017-10-31 18:30:57 -07:00
parent 729a912244
commit 8f93dd590d

View File

@ -5,7 +5,7 @@ Plug 'Shougo/neco-syntax'
Plug 'zchee/deoplete-jedi', { 'for': 'python' } Plug 'zchee/deoplete-jedi', { 'for': 'python' }
Plug 'zchee/deoplete-go', { 'do': 'make' } Plug 'zchee/deoplete-go', { 'do': 'make' }
" inoremap <silent><expr> <nul> pumvisible() ? "\<C-n>" : deoplete#mappings#manual_complete() " Auto complete with C-Space
inoremap <silent><expr> <C-Space> inoremap <silent><expr> <C-Space>
\ pumvisible() ? "\<C-n>" : \ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<C-Space>" : \ <SID>check_back_space() ? "\<C-Space>" :
@ -17,6 +17,9 @@ function! s:check_back_space() abort "{{{
endfunction endfunction
"}}} "}}}
" Auto close preview when done
autocmd InsertLeave,CompleteDone * if pumvisible() == 0 | pclose | endif
if !exists('g:deoplete#sources') if !exists('g:deoplete#sources')
let g:deoplete#sources = {} let g:deoplete#sources = {}
endif endif