Locally reset foldmethod and foldexpr in case it's set to something expensive globally

This commit is contained in:
Jan Larres 2011-05-15 18:25:45 +12:00
parent e84eda8437
commit cd188c6669

View File

@ -1378,6 +1378,11 @@ function! s:OpenWindow(autoclose)
endif
setlocal nofoldenable
" Reset fold settings in case a plugin set them globally to something
" expensive. Apparently 'foldexpr' gets executed even if 'foldenable' is
" off, and then for every appended line (like with :put).
setlocal foldmethod&
setlocal foldexpr&
setlocal statusline=%!TagbarGenerateStatusline()