From eed762774e3174531897989d31146caa979bd2dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= Date: Fri, 20 Nov 2015 23:26:32 +0100 Subject: [PATCH] Add comment and remove superfluous if --- autoload/vimtex/fold.vim | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/autoload/vimtex/fold.vim b/autoload/vimtex/fold.vim index 5c05576..f890bfa 100644 --- a/autoload/vimtex/fold.vim +++ b/autoload/vimtex/fold.vim @@ -34,6 +34,7 @@ endfunction " }}}1 function! vimtex#fold#init_buffer() " {{{1 + " Parse tex file to dynamically set the sectioning fold levels let b:vimtex_fold_parts = s:parse_folded() if !g:vimtex_fold_enabled | return | endif @@ -62,13 +63,11 @@ function! vimtex#fold#init_buffer() " {{{1 " become slow for large files. The following is a hack that is based on " this reply to a discussion on the Vim Developer list: " http://permalink.gmane.org/gmane.editors.vim.devel/14100 - if g:vimtex_fold_automatic - augroup vimtex_fold_automatic - autocmd! - autocmd InsertEnter call FdmSave() - autocmd InsertLeave call FdmRestore() - augroup END - endif + augroup vimtex_fold_automatic + autocmd! + autocmd InsertEnter call FdmSave() + autocmd InsertLeave call FdmRestore() + augroup END else let s:fold_manual_id = get(s:, 'fold_manual_id', 0) + 1 let b:fold_manual_augroup = 'vimtex_fold_' . s:fold_manual_id