diff --git a/autoload/youcompleteme.vim b/autoload/youcompleteme.vim index b13c2aac..200b8e96 100644 --- a/autoload/youcompleteme.vim +++ b/autoload/youcompleteme.vim @@ -297,12 +297,17 @@ function! s:InsideCommentOrString() endfunction +function! s:OnBlankLine() + return pyeval('not vim.current.line or vim.current.line.isspace()') +endfunction + + function! s:InvokeCompletion() if &completefunc != "youcompleteme#Complete" return endif - if s:InsideCommentOrString() + if s:InsideCommentOrString() || s:OnBlankLine() return endif