Don't pass textwidth to yapf when it is 0.

This commit is contained in:
Chiel ten Brinke 2017-02-06 10:30:59 +01:00
parent b92b0e3c5d
commit e579d38339

View File

@ -42,7 +42,7 @@ if !exists('g:formatter_yapf_style')
let g:formatter_yapf_style = 'pep8'
endif
if !exists('g:formatdef_yapf')
let g:formatdef_yapf = "'yapf --style=\"{based_on_style:'.g:formatter_yapf_style.',indent_width:'.&shiftwidth.',column_limit:'.&textwidth.'}\" -l '.a:firstline.'-'.a:lastline"
let g:formatdef_yapf = "'yapf --style=\"{based_on_style:'.g:formatter_yapf_style.',indent_width:'.&shiftwidth.(&textwidth ? ',column_limit:'.&textwidth : '').'}\" -l '.a:firstline.'-'.a:lastline"
endif
if !exists('g:formatters_python')