mirror of
https://github.com/tpope/vim-markdown.git
synced 2025-11-13 20:33:48 -05:00
Don't let fenced language syntaxes change 'foldmethod'
Closes https://github.com/tpope/vim-markdown/issues/154
This commit is contained in:
@@ -15,6 +15,9 @@ endif
|
||||
runtime! syntax/html.vim
|
||||
unlet! b:current_syntax
|
||||
|
||||
if has('folding')
|
||||
let s:foldmethod = &l:foldmethod
|
||||
endif
|
||||
if !exists('g:markdown_fenced_languages')
|
||||
let g:markdown_fenced_languages = []
|
||||
endif
|
||||
@@ -32,6 +35,9 @@ 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
|
||||
endif
|
||||
|
||||
if !exists('g:markdown_minlines')
|
||||
let g:markdown_minlines = 50
|
||||
|
||||
Reference in New Issue
Block a user