Mercurial > vim
comparison src/os_unix.c @ 5533:e35c69ad4823 v7.4.115
updated for version 7.4.115
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)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 11 Dec 2013 13:21:51 +0100 |
parents | 739074bdceb8 |
children | 2f99966971b0 |
comparison
equal
deleted
inserted
replaced
5532:e5c67c992d48 | 5533:e35c69ad4823 |
---|---|
5988 check_spaces = FALSE; | 5988 check_spaces = FALSE; |
5989 if (shell_style == STYLE_PRINT && !did_find_nul) | 5989 if (shell_style == STYLE_PRINT && !did_find_nul) |
5990 { | 5990 { |
5991 /* If there is a NUL, set did_find_nul, else set check_spaces */ | 5991 /* If there is a NUL, set did_find_nul, else set check_spaces */ |
5992 buffer[len] = NUL; | 5992 buffer[len] = NUL; |
5993 if (len && (int)STRLEN(buffer) < (int)len - 1) | 5993 if (len && (int)STRLEN(buffer) < (int)len) |
5994 did_find_nul = TRUE; | 5994 did_find_nul = TRUE; |
5995 else | 5995 else |
5996 check_spaces = TRUE; | 5996 check_spaces = TRUE; |
5997 } | 5997 } |
5998 | 5998 |