From c72b60645cf0f7f35703afafcb5236b962eed984 Mon Sep 17 00:00:00 2001 From: Michael Ennen Date: Fri, 6 May 2016 01:34:39 +0100 Subject: Windows: find_file_in_path: Handle absolute path. #4711 Originally in vim/vim. --- src/nvim/file_search.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/nvim/file_search.c') diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c index 2929790ebf..beefc4238e 100644 --- a/src/nvim/file_search.c +++ b/src/nvim/file_search.c @@ -1400,8 +1400,14 @@ find_file_in_path_option ( && (ff_file_to_find[2] == NUL || vim_ispathsep(ff_file_to_find[2]))))); if (vim_isAbsName(ff_file_to_find) - /* "..", "../path", "." and "./path": don't use the path_option */ + // "..", "../path", "." and "./path": don't use the path_option || rel_to_curdir +#if defined(WIN32) + // handle "\tmp" as absolute path + || vim_ispathsep(ff_file_to_find[0]) + // handle "c:name" as absolute path + || (ff_file_to_find[0] != NUL && ff_file_to_find[1] == ':') +#endif ) { /* * Absolute path, no need to use "path_option". -- cgit