astepano / rpms / vim

Forked from rpms/vim 6 years ago
Clone
0385072
To: vim-dev@vim.org
0385072
Subject: Patch 7.1.199
0385072
Fcc: outbox
0385072
From: Bram Moolenaar <Bram@moolenaar.net>
0385072
Mime-Version: 1.0
0385072
Content-Type: text/plain; charset=ISO-8859-1
0385072
Content-Transfer-Encoding: 8bit
0385072
------------
0385072
0385072
Patch 7.1.199
0385072
Problem:    Can't do command line completion for a specific file name
0385072
	    extension.
0385072
Solution:   When the pattern ends in "$" don't add a star for completion and
0385072
	    remove the "$" before matching with file names.
0385072
Files:	    runtime/doc/cmdline.txt, src/ex_getln.c
0385072
0385072
0385072
*** ../vim-7.1.198/runtime/doc/cmdline.txt	Sat May 12 15:38:39 2007
0385072
--- runtime/doc/cmdline.txt	Fri Jan  4 15:13:06 2008
0385072
***************
0385072
*** 1,4 ****
0385072
! *cmdline.txt*   For Vim version 7.1.  Last change: 2006 Jul 18
0385072
  
0385072
  
0385072
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
0385072
--- 1,4 ----
0385072
! *cmdline.txt*   For Vim version 7.1.  Last change: 2008 Jan 04
0385072
  
0385072
  
0385072
  		  VIM REFERENCE MANUAL    by Bram Moolenaar
0385072
***************
0385072
*** 316,322 ****
0385072
  command-line is shown.  (Note: the shifted arrow keys do not work on all
0385072
  terminals)
0385072
  
0385072
! 							*his* *:history*
0385072
  :his[tory]	Print the history of last entered commands.
0385072
  		{not in Vi}
0385072
  		{not available when compiled without the |+cmdline_hist|
0385072
--- 316,322 ----
0385072
  command-line is shown.  (Note: the shifted arrow keys do not work on all
0385072
  terminals)
0385072
  
0385072
! 							*:his* *:history*
0385072
  :his[tory]	Print the history of last entered commands.
0385072
  		{not in Vi}
0385072
  		{not available when compiled without the |+cmdline_hist|
0385072
***************
0385072
*** 447,452 ****
0385072
--- 447,457 ----
0385072
  
0385072
  To completely ignore files with some extension use 'wildignore'.
0385072
  
0385072
+ To match only files that end at the end of the typed text append a "$".  For
0385072
+ example, to match only files that end in ".c": >
0385072
+ 	:e *.c$
0385072
+ This will not match a file ending in ".cpp".  Without the "$" it does match.
0385072
+ 
0385072
  The old value of an option can be obtained by hitting 'wildchar' just after
0385072
  the '='.  For example, typing 'wildchar' after ":set dir=" will insert the
0385072
  current value of 'dir'.  This overrules file name completion for the options
0385072
*** ../vim-7.1.198/src/ex_getln.c	Wed Jan  2 21:54:33 2008
0385072
--- src/ex_getln.c	Fri Jan  4 15:05:31 2008
0385072
***************
0385072
*** 4078,4083 ****
0385072
--- 4078,4084 ----
0385072
  	     * ~ would be at the start of the file name, but not the tail.
0385072
  	     * $ could be anywhere in the tail.
0385072
  	     * ` could be anywhere in the file name.
0385072
+ 	     * When the name ends in '$' don't add a star, remove the '$'.
0385072
  	     */
0385072
  	    tail = gettail(retval);
0385072
  	    if ((*retval != '~' || tail != retval)
0385072
***************
0385072
*** 4085,4090 ****
0385072
--- 4086,4093 ----
0385072
  		    && vim_strchr(tail, '$') == NULL
0385072
  		    && vim_strchr(retval, '`') == NULL)
0385072
  		retval[len++] = '*';
0385072
+ 	    else if (len > 0 && retval[len - 1] == '$')
0385072
+ 		--len;
0385072
  	    retval[len] = NUL;
0385072
  	}
0385072
      }
0385072
*** ../vim-7.1.198/src/version.c	Fri Jan  4 14:52:14 2008
0385072
--- src/version.c	Fri Jan  4 15:14:29 2008
0385072
***************
0385072
*** 668,669 ****
0385072
--- 668,671 ----
0385072
  {   /* Add new patch number below this line */
0385072
+ /**/
0385072
+     199,
0385072
  /**/
0385072
0385072
-- 
0385072
ARTHUR:  Well, I can't just call you `Man'.
0385072
DENNIS:  Well, you could say `Dennis'.
0385072
ARTHUR:  Well, I didn't know you were called `Dennis.'
0385072
DENNIS:  Well, you didn't bother to find out, did you?
0385072
                                  The Quest for the Holy Grail (Monty Python)
0385072
0385072
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
0385072
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
0385072
\\\        download, build and distribute -- http://www.A-A-P.org        ///
0385072
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///