diff options
author | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-11 22:44:36 +0100 |
---|---|---|
committer | Jurica Bradaric <jbradaric@gmail.com> | 2016-02-11 22:55:00 +0100 |
commit | d12460123e171c224f3aca3952f026590c935ad7 (patch) | |
tree | 94348eb68d448841f9b63ed3014198c864f95dbc /src | |
parent | 8ba32e219f3a05404f8a8b5d3400a6c556ed9d96 (diff) | |
download | rneovim-d12460123e171c224f3aca3952f026590c935ad7.tar.gz rneovim-d12460123e171c224f3aca3952f026590c935ad7.tar.bz2 rneovim-d12460123e171c224f3aca3952f026590c935ad7.zip |
vim-patch:7.4.885
Problem: When doing an upwards search without wildcards the search fails if
the initial directory doesn't exist.
Solution: Fix the non-wildcard case. (Stefan Kempf)
https://github.com/vim/vim/commit/c79a5452acd695238798947e40086f9823c400e7
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/file_search.c | 19 | ||||
-rw-r--r-- | src/nvim/version.c | 2 |
2 files changed, 7 insertions, 14 deletions
diff --git a/src/nvim/file_search.c b/src/nvim/file_search.c index b213a42c52..ca586b74d5 100644 --- a/src/nvim/file_search.c +++ b/src/nvim/file_search.c @@ -484,28 +484,21 @@ vim_findfile_init ( len = (int)(p - search_ctx->ffsc_fix_path) - 1; STRNCAT(ff_expand_buffer, search_ctx->ffsc_fix_path, len); add_pathsep((char *)ff_expand_buffer); - } else + } else { len = (int)STRLEN(search_ctx->ffsc_fix_path); + } if (search_ctx->ffsc_wc_path != NULL) { wc_path = vim_strsave(search_ctx->ffsc_wc_path); temp = xmalloc(STRLEN(search_ctx->ffsc_wc_path) + STRLEN(search_ctx->ffsc_fix_path + len) + 1); - } - - if (temp == NULL || wc_path == NULL) { - xfree(buf); - xfree(temp); + STRCPY(temp, search_ctx->ffsc_fix_path + len); + STRCAT(temp, search_ctx->ffsc_wc_path); + xfree(search_ctx->ffsc_wc_path); xfree(wc_path); - goto error_return; + search_ctx->ffsc_wc_path = temp; } - - STRCPY(temp, search_ctx->ffsc_fix_path + len); - STRCAT(temp, search_ctx->ffsc_wc_path); - xfree(search_ctx->ffsc_wc_path); - xfree(wc_path); - search_ctx->ffsc_wc_path = temp; } xfree(buf); } diff --git a/src/nvim/version.c b/src/nvim/version.c index 4b00349270..3c84d60019 100644 --- a/src/nvim/version.c +++ b/src/nvim/version.c @@ -403,7 +403,7 @@ static int included_patches[] = { // 888, // 887, // 886 NA - // 885, + 885, // 884 NA // 883, // 882, |