comparison src/misc1.c @ 7038:76042a56ab85 v7.4.832

commit https://github.com/vim/vim/commit/be83b73ddb2ee8297037166d243f72e3423a3ce3 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Aug 25 14:21:19 2015 +0200 patch 7.4.832 Problem: $HOME in is expanded too early. Solution: Skip over when expanding environment names.
author Christian Brabandt <cb@256bit.org>
date Tue, 25 Aug 2015 17:20:26 +0200
parents 5f00b8d7148f
children 094c8ccdc279
comparison
equal deleted inserted replaced
7037:cbd20a957656 7038:76042a56ab85
3967 3967
3968 src = skipwhite(srcp); 3968 src = skipwhite(srcp);
3969 --dstlen; /* leave one char space for "\," */ 3969 --dstlen; /* leave one char space for "\," */
3970 while (*src && dstlen > 0) 3970 while (*src && dstlen > 0)
3971 { 3971 {
3972 #ifdef FEAT_EVAL
3973 /* Skip over `=expr`. */
3974 if (src[0] == '`' && src[1] == '=')
3975 {
3976 size_t len;
3977
3978 var = src;
3979 src += 2;
3980 (void)skip_expr(&src);
3981 if (*src == '`')
3982 ++src;
3983 len = src - var;
3984 if (len > (size_t)dstlen)
3985 len = dstlen;
3986 vim_strncpy(dst, var, len);
3987 dst += len;
3988 dstlen -= len;
3989 continue;
3990 }
3991 #endif
3972 copy_char = TRUE; 3992 copy_char = TRUE;
3973 if ((*src == '$' 3993 if ((*src == '$'
3974 #ifdef VMS 3994 #ifdef VMS
3975 && at_start 3995 && at_start
3976 #endif 3996 #endif