X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/9ecbf8b6a70400349d55da7d5061cca8ff1816b4..f06efe01b7e7228715e84ad7ec5c7d8be9fdd6d7:/after/ftplugin/markdown.vim diff --git a/after/ftplugin/markdown.vim b/after/ftplugin/markdown.vim index 0010d53..6265db3 100644 --- a/after/ftplugin/markdown.vim +++ b/after/ftplugin/markdown.vim @@ -124,8 +124,7 @@ else let l1 = getline(a:lnum) if l1 =~ '^#' && !s:is_mkdCode(a:lnum) " fold level according to option - let l:level = matchend(l1, '^#\+') - if s:vim_markdown_folding_level == 1 || l:level > s:vim_markdown_folding_level + if s:vim_markdown_folding_level == 1 || matchend(l1, '^#\+') > s:vim_markdown_folding_level return -1 else " headers are not folded @@ -137,7 +136,7 @@ else " current line starts with hashes return '>'.matchend(l0, '^#\+') else - " fold here because of setext headers + " keep previous foldlevel return '=' endif endfunction