Skip to content

Commit

Permalink
Prevent embedded language syntaxes from changing 'foldtext' (#352)
Browse files Browse the repository at this point in the history
  • Loading branch information
Konfekt authored Feb 18, 2021
1 parent 2521e2e commit 36509e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions syntax/pandoc.vim
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ function! EnableEmbedsforCodeblocksWithLang(entry)
" prevent embedded language syntaxes from changing 'foldmethod'
if has('folding')
let s:foldmethod = &l:foldmethod
let s:foldtext = &l:foldtext
endif

try
Expand All @@ -183,6 +184,9 @@ function! EnableEmbedsforCodeblocksWithLang(entry)
if exists('s:foldmethod') && s:foldmethod !=# &l:foldmethod
let &l:foldmethod = s:foldmethod
endif
if exists('s:foldtext') && s:foldtext !=# &l:foldtext
let &l:foldtext = s:foldtext
endif
endfunction
" }}}2

Expand Down

0 comments on commit 36509e9

Please sign in to comment.