Don't leave whitespace on empty lines
This was caused by complicated interactions with Vim. Fixes #15.
This commit is contained in:
parent
6be3cd37ed
commit
0a4d82b171
@ -297,12 +297,17 @@ function! s:InsideCommentOrString()
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
|
function! s:OnBlankLine()
|
||||||
|
return pyeval('not vim.current.line or vim.current.line.isspace()')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! s:InvokeCompletion()
|
function! s:InvokeCompletion()
|
||||||
if &completefunc != "youcompleteme#Complete"
|
if &completefunc != "youcompleteme#Complete"
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if s:InsideCommentOrString()
|
if s:InsideCommentOrString() || s:OnBlankLine()
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user