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