X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/20704d86a0ae043664f3facca84a61eded05de6e..26cfc8ef05385a8b5f526c4d461d982a82b119b2:/after/ftplugin/mkd.vim?ds=inline diff --git a/after/ftplugin/mkd.vim b/after/ftplugin/mkd.vim index f04ae2b..b0b0946 100644 --- a/after/ftplugin/mkd.vim +++ b/after/ftplugin/mkd.vim @@ -7,8 +7,8 @@ " original version from Steve Losh's gist: https://gist.github.com/1038710 func! Foldexpr_markdown(lnum) - if (a:lnum == 0) - let l0 = getline(a:lnum) + if (a:lnum == 1) + let l0 = '' else let l0 = getline(a:lnum-1) endif @@ -29,9 +29,6 @@ func! Foldexpr_markdown(lnum) elseif l0 =~ '^#' " current line starts with hashes return '>'.matchend(l0, '^#\+') - elseif a:lnum == 1 - " fold any 'preamble' - return '>1' else " keep previous foldlevel return '='