From cd188c66699d6a6c77472c48ed4bf795b8b4192f Mon Sep 17 00:00:00 2001 From: Jan Larres Date: Sun, 15 May 2011 18:25:45 +1200 Subject: [PATCH] Locally reset foldmethod and foldexpr in case it's set to something expensive globally --- plugin/tagbar.vim | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugin/tagbar.vim b/plugin/tagbar.vim index 90377f0..6133fa5 100644 --- a/plugin/tagbar.vim +++ b/plugin/tagbar.vim @@ -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()