vim: fix rainbow activating when it shouldn't

master
an 2019-10-03 15:24:43 -04:00
parent 9254762703
commit 75ccba9aa7
1 changed files with 9 additions and 1 deletions

View File

@ -175,6 +175,14 @@ fu _agw.set_color(scheme)
endif
endfu
fu _agw.set_rainbow()
if g:_agw.is_lang(&ft)
exec 'RainbowToggleOn'
else
exec 'RainbowToggleOff'
endif
endfu
" Settings -------------------------------------------------------------------|
" general settings (use :help for these)
@ -529,7 +537,7 @@ augroup AGW
" Enable rainbow braces
if _agw.use_rainbow != 0
au BufEnter * if _agw.is_lang(&ft) | exec 'RainbowToggleOn' | endif
au BufEnter * call _agw.set_rainbow()
endif
" suppress readonly warnings