105fb09
To: vim-dev@vim.org
105fb09
Subject: Patch 7.2.410
105fb09
Fcc: outbox
105fb09
From: Bram Moolenaar <Bram@moolenaar.net>
105fb09
Mime-Version: 1.0
105fb09
Content-Type: text/plain; charset=UTF-8
105fb09
Content-Transfer-Encoding: 8bit
105fb09
------------
105fb09
105fb09
Patch 7.2.410
105fb09
Problem:    Highlighting directories for completion doesn't work properly.
105fb09
Solution:   Don't halve backslashes when not needed, expaned "~/".
105fb09
	    (Dominique Pelle)
105fb09
Files:	    src/ex_getln.c
105fb09
105fb09
105fb09
*** ../vim-7.2.409/src/ex_getln.c	2010-03-17 19:13:19.000000000 +0100
105fb09
--- src/ex_getln.c	2010-03-23 18:00:56.000000000 +0100
105fb09
***************
105fb09
*** 3948,3959 ****
105fb09
  					  || xp->xp_context == EXPAND_SHELLCMD
105fb09
  					  || xp->xp_context == EXPAND_BUFFERS)
105fb09
  		{
105fb09
- 		    char_u	*halved_slash;
105fb09
- 
105fb09
  		    /* highlight directories */
105fb09
! 		    halved_slash = backslash_halve_save(files_found[k]);
105fb09
! 		    j = mch_isdir(halved_slash);
105fb09
! 		    vim_free(halved_slash);
105fb09
  		    if (showtail)
105fb09
  			p = L_SHOWFILE(k);
105fb09
  		    else
105fb09
--- 3948,3973 ----
105fb09
  					  || xp->xp_context == EXPAND_SHELLCMD
105fb09
  					  || xp->xp_context == EXPAND_BUFFERS)
105fb09
  		{
105fb09
  		    /* highlight directories */
105fb09
! 		    if (xp->xp_numfiles != -1)
105fb09
! 		    {
105fb09
! 			char_u	*halved_slash;
105fb09
! 			char_u	*exp_path;
105fb09
! 
105fb09
! 			/* Expansion was done before and special characters
105fb09
! 			 * were escaped, need to halve backslashes.  Also
105fb09
! 			 * $HOME has been replaced with ~/. */
105fb09
! 			exp_path = expand_env_save_opt(files_found[k], TRUE);
105fb09
! 			halved_slash = backslash_halve_save(
105fb09
! 				exp_path != NULL ? exp_path : files_found[k]);
105fb09
! 			j = mch_isdir(halved_slash != NULL ? halved_slash
105fb09
! 							    : files_found[k]);
105fb09
! 			vim_free(exp_path);
105fb09
! 			vim_free(halved_slash);
105fb09
! 		    }
105fb09
! 		    else
105fb09
! 			/* Expansion was done here, file names are literal. */
105fb09
! 			j = mch_isdir(files_found[k]);
105fb09
  		    if (showtail)
105fb09
  			p = L_SHOWFILE(k);
105fb09
  		    else
105fb09
*** ../vim-7.2.409/src/version.c	2010-03-23 17:49:19.000000000 +0100
105fb09
--- src/version.c	2010-03-23 18:04:25.000000000 +0100
105fb09
***************
105fb09
*** 683,684 ****
105fb09
--- 683,686 ----
105fb09
  {   /* Add new patch number below this line */
105fb09
+ /**/
105fb09
+     410,
105fb09
  /**/
105fb09
105fb09
-- 
105fb09
BRIDGEKEEPER: What is your favorite colour?
105fb09
GAWAIN:       Blue ...  No yelloooooww!
105fb09
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
105fb09
105fb09
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
105fb09
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
105fb09
\\\        download, build and distribute -- http://www.A-A-P.org        ///
105fb09
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///