vim: fix conditionals

master
an 2019-08-31 22:32:01 -04:00
parent 1b50a315ad
commit 8d688f4f02
1 changed files with 3 additions and 3 deletions

View File

@ -87,7 +87,7 @@ fu _agw.is_lang(lang)
endfu
fu _agw.fill_line()
if g:_agw.use_ruby
if g:_agw.use_ruby != 0
ruby<<
tw = VIM::evaluate("&tw").to_i
tw = 80 if tw == 0
@ -129,11 +129,11 @@ fu _agw.statusline_start()
endfu
fu _agw.strip_white()
if g:_agw.use_ruby
if g:_agw.use_ruby != 0
ruby<<
for ln in 1..$curbuf.length
li = $curbuf[ln]
if li[-1] == ?\s
if li[-1] =~ /\s/
$curbuf[ln] = li.rstrip!
end
end