mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 7.4.832
Problem: $HOME in is expanded too early. Solution: Skip over when expanding environment names.
This commit is contained in:
20
src/misc1.c
20
src/misc1.c
@@ -3969,6 +3969,26 @@ expand_env_esc(srcp, dst, dstlen, esc, one, startstr)
|
||||
--dstlen; /* leave one char space for "\," */
|
||||
while (*src && dstlen > 0)
|
||||
{
|
||||
#ifdef FEAT_EVAL
|
||||
/* Skip over `=expr`. */
|
||||
if (src[0] == '`' && src[1] == '=')
|
||||
{
|
||||
size_t len;
|
||||
|
||||
var = src;
|
||||
src += 2;
|
||||
(void)skip_expr(&src);
|
||||
if (*src == '`')
|
||||
++src;
|
||||
len = src - var;
|
||||
if (len > (size_t)dstlen)
|
||||
len = dstlen;
|
||||
vim_strncpy(dst, var, len);
|
||||
dst += len;
|
||||
dstlen -= len;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
copy_char = TRUE;
|
||||
if ((*src == '$'
|
||||
#ifdef VMS
|
||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
832,
|
||||
/**/
|
||||
831,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user