'empty' over 'strlen' for empty string check (duh)
This commit is contained in:
parent
82bd32aa16
commit
c394cb557e
@ -113,13 +113,13 @@ function! s:SetUpKeyMappings()
|
|||||||
\ ' pumvisible() ? "\<C-p>" : "\' . key .'"'
|
\ ' pumvisible() ? "\<C-p>" : "\' . key .'"'
|
||||||
endfor
|
endfor
|
||||||
|
|
||||||
if strlen(g:ycm_key_invoke_completion)
|
if !empty( g:ycm_key_invoke_completion )
|
||||||
" <c-x><c-o> trigger omni completion, <c-p> deselects the first completion
|
" <c-x><c-o> trigger omni completion, <c-p> deselects the first completion
|
||||||
" candidate that vim selects by default
|
" candidate that vim selects by default
|
||||||
exe 'inoremap <unique> ' . g:ycm_key_invoke_completion . ' <C-X><C-O><C-P>'
|
exe 'inoremap <unique> ' . g:ycm_key_invoke_completion . ' <C-X><C-O><C-P>'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if strlen(g:ycm_key_detailed_diagnostics)
|
if !empty( g:ycm_key_detailed_diagnostics )
|
||||||
exe 'nnoremap <unique> ' . g:ycm_key_detailed_diagnostics .
|
exe 'nnoremap <unique> ' . g:ycm_key_detailed_diagnostics .
|
||||||
\ ' :YcmShowDetailedDiagnostic<cr>'
|
\ ' :YcmShowDetailedDiagnostic<cr>'
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user