Don't let Detect() bottom out to checking // #305

Merged
merged 1 commit into from Mar 2, 2014

2 participants

@kelsin

NOTE: I'm not a an experienced vim coder so please make this change yourself if adding this hacky if is not the proper way :)

Solves bug for cygwin users where this would cause a network lookup which can be painfully slow in windows.

This is the same bug as: tpope/vim-fugitive#210

On windows if you end up checking a '//...' path for anything windows decides the best course of action is to stall out and check network paths.

@kelsin kelsin Don't let Detect() bottom out to checking //
Solves bug for cygwin users where this would cause a network lookup
which can be painfully slow in windows
e36e781
@tpope
Owner

This solution feels a bit off (leaving out non-cygwin users for starters) but I'm okay merging it until something better comes along.

@tpope tpope merged commit 0714a65 into tpope:master Mar 2, 2014
@kelsin

Yeah, definitely didn't mean to leave out non-cygwin users. When I was running the native vim in windows it didn't have this problem when testing '//' :-(

It also seems like another plugin is causing the same issue so I'm still searching, but running :echo filereadable("//") can take a while to return the first time you run it (sometimes windows caches it... sometimes not... don't know enough to know why) so this fix should possibly help a little bit.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment