Selecting autocompletion with the return key won't also linebreak

This commit is contained in:
Kevin MacMartin 2014-07-10 00:00:20 -04:00
parent 71a33571c4
commit e07931125e

View file

@ -475,7 +475,7 @@
"neocomplcache close popup and save indent
inoremap <silent> <CR> <C-r>=<SID>neocompl_cr()<CR>
function! s:neocompl_cr()
return neocomplcache#smart_close_popup() . "\<CR>"
return pumvisible() ? neocomplcache#close_popup() : "\<CR>"
endfunction
"neocomplcache tab completion
inoremap <expr><TAB> pumvisible() ? "\<C-n>" : "\<TAB>"