0
0
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:
Bram Moolenaar
2015-08-25 14:21:19 +02:00
parent 3f188935ec
commit be83b73ddb
2 changed files with 22 additions and 0 deletions

View File

@@ -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

View File

@@ -741,6 +741,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
832,
/**/
831,
/**/