# HG changeset patch # User miguel # Date 1347410910 -3600 # Node ID efe9199dbd414adb4fda012850f9eb646cd45969 # Parent 38db5185d698fe590c63f12899b59652ea252bb6 try not to mess with buffers that are regular files (eg: netrw) diff -r 38db5185d698 -r efe9199dbd41 hgrev/plugin/hgrev.vim --- 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 = ''