Skip to content

Commit

Permalink
Also don't let HTML and dependent syntaxes change 'foldmethod'
Browse files Browse the repository at this point in the history
References #154
  • Loading branch information
tpope committed Jan 30, 2020
1 parent 719b046 commit 6c4c60f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions syntax/markdown.vim
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ if !exists('main_syntax')
let main_syntax = 'markdown'
endif

runtime! syntax/html.vim
unlet! b:current_syntax

if has('folding')
let s:foldmethod = &l:foldmethod
endif

runtime! syntax/html.vim
unlet! b:current_syntax

if !exists('g:markdown_fenced_languages')
let g:markdown_fenced_languages = []
endif
Expand All @@ -35,8 +36,10 @@ for s:type in map(copy(g:markdown_fenced_languages),'matchstr(v:val,"[^=]*$")')
endfor
unlet! s:type
unlet! s:done_include

if exists('s:foldmethod') && s:foldmethod !=# &l:foldmethod
let &l:foldmethod = s:foldmethod
unlet s:foldmethod
endif

if !exists('g:markdown_minlines')
Expand Down

0 comments on commit 6c4c60f

Please sign in to comment.