Fix large file message appearing twice
Use PostVimMessage to avoid "Press ENTER or type command to continue" message.
This commit is contained in:
parent
8161d35030
commit
c394895c4e
@ -431,13 +431,16 @@ endfunction
|
|||||||
|
|
||||||
|
|
||||||
function! s:DisableOnLargeFile( filename )
|
function! s:DisableOnLargeFile( filename )
|
||||||
|
if exists( 'b:ycm_largefile' )
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
let threshold = g:ycm_disable_for_files_larger_than_kb * 1024
|
let threshold = g:ycm_disable_for_files_larger_than_kb * 1024
|
||||||
|
|
||||||
if threshold > 0 && getfsize( a:filename ) > threshold
|
if threshold > 0 && getfsize( a:filename ) > threshold
|
||||||
echohl WarningMsg |
|
exec s:python_command "vimsupport.PostVimMessage("
|
||||||
\ echomsg "YouCompleteMe is disabled in this buffer; " .
|
\ "'YouCompleteMe is disabled in this buffer;"
|
||||||
\ "the file exceeded the max size (see YCM options)." |
|
\ "the file exceeded the max size (see YCM options).')"
|
||||||
\ echohl None
|
|
||||||
let b:ycm_largefile = 1
|
let b:ycm_largefile = 1
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
Loading…
Reference in New Issue
Block a user