hgrev/plugin/hgrev.vim
branchvim-stuff
changeset 25 efe9199dbd41
parent 15 285603587539
child 27 595320486f69
--- a/hgrev/plugin/hgrev.vim	Mon Aug 20 16:14:43 2012 -0700
+++ b/hgrev/plugin/hgrev.vim	Wed Sep 12 01:48:30 2012 +0100
@@ -70,6 +70,13 @@
 	" Find the closest HG root for the buffer. 'hg root' won't do it, since
 	" it works off the cwd, and we need the nearest root from the filename.
 	"
+
+	if matchstr(bufname('%'), "^[^:/]\\+://") != ''
+		" not on this buffer...
+		" (we're unlikely to get lucky finding '.hg' in http:// or similar)
+		return
+	endif
+
 	let l:searchpaths = split( expand('%:p:h'), '/' )
 	let l:dircount = len(l:searchpaths)
 	let l:root = ''