jkunstle / rpms / vim

Forked from rpms/vim 3 years ago
Clone

Blame SOURCES/7.4.423

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