diff options
author | Bram Moolenaar <bram@vim.org> | 2013-12-11 13:21:51 +0100 |
---|---|---|
committer | Bram Moolenaar <bram@vim.org> | 2013-12-11 13:21:51 +0100 |
commit | 7dde10305d94d25e4049e474514ebccf43b00c71 (patch) | |
tree | e7d989d289436b759f200f0e4f094a7dc1f57b7b | |
parent | 3795f8648aaa947607a4ae53a3b055a48702cc83 (diff) | |
download | vim-7dde10305d94d25e4049e474514ebccf43b00c71.tar.gz |
Problem: When using Zsh expanding ~abc doesn't work when the result
contains a space.
Solution: Off-by-one error in detecting the NUL. (Pavol Juhas)
-rw-r--r-- | src/os_unix.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/os_unix.c b/src/os_unix.c index 5eb0936c..148d033c 100644 --- a/src/os_unix.c +++ b/src/os_unix.c @@ -5990,7 +5990,7 @@ mch_expand_wildcards(num_pat, pat, num_file, file, flags) { /* If there is a NUL, set did_find_nul, else set check_spaces */ buffer[len] = NUL; - if (len && (int)STRLEN(buffer) < (int)len - 1) + if (len && (int)STRLEN(buffer) < (int)len) did_find_nul = TRUE; else check_spaces = TRUE; diff --git a/src/version.c b/src/version.c index f7a35520..a69488f1 100644 --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 115, +/**/ 114, /**/ 113, |