|
|
3ef2ca |
To: vim_dev@googlegroups.com
|
|
|
3ef2ca |
Subject: Patch 7.4.423
|
|
|
3ef2ca |
Fcc: outbox
|
|
|
3ef2ca |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
|
3ef2ca |
Mime-Version: 1.0
|
|
|
3ef2ca |
Content-Type: text/plain; charset=UTF-8
|
|
|
3ef2ca |
Content-Transfer-Encoding: 8bit
|
|
|
3ef2ca |
------------
|
|
|
3ef2ca |
|
|
|
3ef2ca |
Patch 7.4.423
|
|
|
3ef2ca |
Problem: expand("$shell") does not work as documented.
|
|
|
3ef2ca |
Solution: Do not escape the $ when expanding environment variables.
|
|
|
3ef2ca |
Files: src/os_unix.c, src/misc1.c, src/vim.h
|
|
|
3ef2ca |
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.422/src/os_unix.c 2014-07-30 17:21:53.815518506 +0200
|
|
|
3ef2ca |
--- src/os_unix.c 2014-08-29 12:47:57.230428808 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 5939,5948 ****
|
|
|
3ef2ca |
*p++ = '\\';
|
|
|
3ef2ca |
++j;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
! else if (!intick && vim_strchr(SHELL_SPECIAL,
|
|
|
3ef2ca |
! pat[i][j]) != NULL)
|
|
|
3ef2ca |
/* Put a backslash before a special character, but not
|
|
|
3ef2ca |
! * when inside ``. */
|
|
|
3ef2ca |
*p++ = '\\';
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/* Copy one character. */
|
|
|
3ef2ca |
--- 5939,5950 ----
|
|
|
3ef2ca |
*p++ = '\\';
|
|
|
3ef2ca |
++j;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
! else if (!intick
|
|
|
3ef2ca |
! && ((flags & EW_KEEPDOLLAR) == 0 || pat[i][j] != '$')
|
|
|
3ef2ca |
! && vim_strchr(SHELL_SPECIAL, pat[i][j]) != NULL)
|
|
|
3ef2ca |
/* Put a backslash before a special character, but not
|
|
|
3ef2ca |
! * when inside ``. And not for $var when EW_KEEPDOLLAR is
|
|
|
3ef2ca |
! * set. */
|
|
|
3ef2ca |
*p++ = '\\';
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/* Copy one character. */
|
|
|
3ef2ca |
*** ../vim-7.4.422/src/misc1.c 2014-08-06 17:44:09.867161966 +0200
|
|
|
3ef2ca |
--- src/misc1.c 2014-08-29 12:48:11.390428839 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 78,84 ****
|
|
|
3ef2ca |
if (!list || lcs_tab1) /* count a tab for what it is worth */
|
|
|
3ef2ca |
count += ts - (count % ts);
|
|
|
3ef2ca |
else
|
|
|
3ef2ca |
! /* in list mode, when tab is not set, count screen char width for Tab: ^I */
|
|
|
3ef2ca |
count += ptr2cells(ptr);
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
else if (*ptr == ' ')
|
|
|
3ef2ca |
--- 78,85 ----
|
|
|
3ef2ca |
if (!list || lcs_tab1) /* count a tab for what it is worth */
|
|
|
3ef2ca |
count += ts - (count % ts);
|
|
|
3ef2ca |
else
|
|
|
3ef2ca |
! /* In list mode, when tab is not set, count screen char width
|
|
|
3ef2ca |
! * for Tab, displays: ^I */
|
|
|
3ef2ca |
count += ptr2cells(ptr);
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
else if (*ptr == ' ')
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 10767,10773 ****
|
|
|
3ef2ca |
vim_free(p);
|
|
|
3ef2ca |
ga_clear_strings(&ga);
|
|
|
3ef2ca |
i = mch_expand_wildcards(num_pat, pat, num_file, file,
|
|
|
3ef2ca |
! flags);
|
|
|
3ef2ca |
recursive = FALSE;
|
|
|
3ef2ca |
return i;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
--- 10768,10774 ----
|
|
|
3ef2ca |
vim_free(p);
|
|
|
3ef2ca |
ga_clear_strings(&ga);
|
|
|
3ef2ca |
i = mch_expand_wildcards(num_pat, pat, num_file, file,
|
|
|
3ef2ca |
! flags|EW_KEEPDOLLAR);
|
|
|
3ef2ca |
recursive = FALSE;
|
|
|
3ef2ca |
return i;
|
|
|
3ef2ca |
}
|
|
|
3ef2ca |
*** ../vim-7.4.422/src/vim.h 2014-08-23 14:16:11.880625637 +0200
|
|
|
3ef2ca |
--- src/vim.h 2014-08-29 12:46:47.370428655 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 835,840 ****
|
|
|
3ef2ca |
--- 835,841 ----
|
|
|
3ef2ca |
#define EW_ICASE 0x100 /* ignore case */
|
|
|
3ef2ca |
#define EW_NOERROR 0x200 /* no error for bad regexp */
|
|
|
3ef2ca |
#define EW_NOTWILD 0x400 /* add match with literal name if exists */
|
|
|
3ef2ca |
+ #define EW_KEEPDOLLAR 0x800 /* do not escape $, $var is expanded */
|
|
|
3ef2ca |
/* Note: mostly EW_NOTFOUND and EW_SILENT are mutually exclusive: EW_NOTFOUND
|
|
|
3ef2ca |
* is used when executing commands and EW_SILENT for interactive expanding. */
|
|
|
3ef2ca |
|
|
|
3ef2ca |
*** ../vim-7.4.422/src/version.c 2014-08-29 12:08:39.686423658 +0200
|
|
|
3ef2ca |
--- src/version.c 2014-08-29 12:48:54.138428932 +0200
|
|
|
3ef2ca |
***************
|
|
|
3ef2ca |
*** 743,744 ****
|
|
|
3ef2ca |
--- 743,746 ----
|
|
|
3ef2ca |
{ /* Add new patch number below this line */
|
|
|
3ef2ca |
+ /**/
|
|
|
3ef2ca |
+ 423,
|
|
|
3ef2ca |
/**/
|
|
|
3ef2ca |
|
|
|
3ef2ca |
--
|
|
|
3ef2ca |
From "know your smileys":
|
|
|
3ef2ca |
:~) A man with a tape recorder up his nose
|
|
|
3ef2ca |
|
|
|
3ef2ca |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
|
3ef2ca |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
|
3ef2ca |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
|
3ef2ca |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|