hgrev/plugin/hgrev.vim
branchvim-stuff
changeset 27 595320486f69
parent 25 efe9199dbd41
equal deleted inserted replaced
26:e3edddb48a91 27:595320486f69
    69 
    69 
    70 	" Find the closest HG root for the buffer. 'hg root' won't do it, since
    70 	" Find the closest HG root for the buffer. 'hg root' won't do it, since
    71 	" it works off the cwd, and we need the nearest root from the filename.
    71 	" it works off the cwd, and we need the nearest root from the filename.
    72 	"
    72 	"
    73 
    73 
       
    74 	" (we're unlikely to get lucky finding '.hg' in http:// or similar)
       
    75 	"
    74 	if matchstr(bufname('%'), "^[^:/]\\+://") != ''
    76 	if matchstr(bufname('%'), "^[^:/]\\+://") != ''
    75 		" not on this buffer...
       
    76 		" (we're unlikely to get lucky finding '.hg' in http:// or similar)
       
    77 		return
    77 		return
    78 	endif
    78 	endif
    79 
    79 
    80 	let l:searchpaths = split( expand('%:p:h'), '/' )
    80 	let l:searchpaths = split( expand('%:p:h'), '/' )
    81 	let l:dircount = len(l:searchpaths)
    81 	let l:dircount = len(l:searchpaths)