X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/9a3b3126eeb98a1bf5a327912b2ff0bf591ccec2..d6a3b09139a715bc39e0a16ad1924ac3d9fcc216:/ftplugin/mkd.vim?ds=sidebyside diff --git a/ftplugin/mkd.vim b/ftplugin/mkd.vim index 057947b..42dca90 100644 --- a/ftplugin/mkd.vim +++ b/ftplugin/mkd.vim @@ -319,10 +319,10 @@ function! s:Markdown_Toc(...) lopen endif set modifiable - %s/\v^([^|]*\|){2,2} #// + %s/\v^([^|]*\|){2,2} #//e for i in range(1, line('$')) - " this is the quickfix data for the current item - let d = getqflist()[i-1] + " this is the location-list data for the current item + let d = getloclist(0)[i-1] " atx headers if match(d.text, "^#") > -1 let l:level = len(matchstr(d.text, '#*', 'g'))-1