We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d3d1b6 commit cc82d88Copy full SHA for cc82d88
ftplugin/markdown.vim
@@ -656,7 +656,12 @@ endfunction
656
function! s:OpenUrlUnderCursor()
657
let l:url = s:Markdown_GetUrlForPosition(line('.'), col('.'))
658
if l:url !=# ''
659
- call s:VersionAwareNetrwBrowseX(l:url)
+ if l:url =~? 'http[s]\?:\/\/[[:alnum:]%\/_#.-]*'
660
+ "Do nothing
661
+ else
662
+ let l:url = expand(expand('%:h').'/'.l:url)
663
+ endif
664
+ call s:VersionAwareNetrwBrowseX(l:url)
665
else
666
echomsg 'The cursor is not on a link.'
667
endif
0 commit comments