X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/f3c4ace059796ff87802aa0d20732965bb8c8a32..1510e2cad59855b3bc4c48ec9a4c07c94e4bcb58:/ftplugin/mkd.vim diff --git a/ftplugin/mkd.vim b/ftplugin/mkd.vim index 05316ab..6e04bd2 100644 --- a/ftplugin/mkd.vim +++ b/ftplugin/mkd.vim @@ -464,14 +464,12 @@ endfunction " - a string with the the URL for the link under the cursor " - an empty string if the cursor is not on a link " -" `b:` instead of `s:` to make it testable. -" " TODO " " - multiline support " - give an error if the separator does is not on a link " -function! b:Markdown_GetUrlForPosition(lnum, col) +function! s:Markdown_GetUrlForPosition(lnum, col) let l:lnum = a:lnum let l:col = a:col let l:syn = synIDattr(synID(l:lnum, l:col, 1), 'name') @@ -504,7 +502,7 @@ endfunction " Front end for GetUrlForPosition. " function! s:OpenUrlUnderCursor() - let l:url = b:Markdown_GetUrlForPosition(line('.'), col('.')) + let l:url = s:Markdown_GetUrlForPosition(line('.'), col('.')) if l:url != '' call netrw#NetrwBrowseX(l:url, 0) else