components/vim/vim72-patches/7.2.234
changeset 198 172fc01ce997
equal deleted inserted replaced
197:fd801ec0737c 198:172fc01ce997
       
     1 To: [email protected]
       
     2 Subject: Patch 7.2.234
       
     3 Fcc: outbox
       
     4 From: Bram Moolenaar <[email protected]>
       
     5 Mime-Version: 1.0
       
     6 Content-Type: text/plain; charset=UTF-8
       
     7 Content-Transfer-Encoding: 8bit
       
     8 ------------
       
     9 
       
    10 Patch 7.2.234
       
    11 Problem:    It is not possible to ignore file names without a suffix.
       
    12 Solution:   Use an empty entry in 'suffixes' for file names without a dot.
       
    13 Files:	    runtime/doc/cmdline.txt, src/misc1.c
       
    14 
       
    15 
       
    16 *** ../vim-7.2.233/runtime/doc/cmdline.txt	2008-11-09 13:43:25.000000000 +0100
       
    17 --- runtime/doc/cmdline.txt	2009-07-14 13:35:56.000000000 +0200
       
    18 ***************
       
    19 *** 441,453 ****
       
    20   those files with an extension that is in the 'suffixes' option are ignored.
       
    21   The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
       
    22   in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
       
    23 ! It is impossible to ignore suffixes with two dots.  Examples:
       
    24   
       
    25     pattern:	files:				match:	~
       
    26      test*	test.c test.h test.o		test.c
       
    27      test*	test.h test.o			test.h and test.o
       
    28      test*	test.i test.h test.c		test.i and test.c
       
    29   
       
    30   If there is more than one matching file (after ignoring the ones matching
       
    31   the 'suffixes' option) the first file name is inserted.  You can see that
       
    32   there is only one match when you type 'wildchar' twice and the completed
       
    33 --- 439,458 ----
       
    34   those files with an extension that is in the 'suffixes' option are ignored.
       
    35   The default is ".bak,~,.o,.h,.info,.swp,.obj", which means that files ending
       
    36   in ".bak", "~", ".o", ".h", ".info", ".swp" and ".obj" are sometimes ignored.
       
    37 ! 
       
    38 ! An empty entry, two consecutive commas, match a file name that does not
       
    39 ! contain a ".", thus has no suffix.  This is useful to ignore "prog" and prefer
       
    40 ! "prog.c".
       
    41 ! 
       
    42 ! Examples:
       
    43   
       
    44     pattern:	files:				match:	~
       
    45      test*	test.c test.h test.o		test.c
       
    46      test*	test.h test.o			test.h and test.o
       
    47      test*	test.i test.h test.c		test.i and test.c
       
    48   
       
    49 + It is impossible to ignore suffixes with two dots.
       
    50 + 
       
    51   If there is more than one matching file (after ignoring the ones matching
       
    52   the 'suffixes' option) the first file name is inserted.  You can see that
       
    53   there is only one match when you type 'wildchar' twice and the completed
       
    54 *** ../vim-7.2.233/src/misc1.c	2009-07-09 20:06:30.000000000 +0200
       
    55 --- src/misc1.c	2009-07-14 15:51:55.000000000 +0200
       
    56 ***************
       
    57 *** 8533,8543 ****
       
    58       for (setsuf = p_su; *setsuf; )
       
    59       {
       
    60   	setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,");
       
    61 ! 	if (fnamelen >= setsuflen
       
    62 ! 		&& fnamencmp(suf_buf, fname + fnamelen - setsuflen,
       
    63 ! 					      (size_t)setsuflen) == 0)
       
    64 ! 	    break;
       
    65 ! 	setsuflen = 0;
       
    66       }
       
    67       return (setsuflen != 0);
       
    68   }
       
    69 --- 8534,8558 ----
       
    70       for (setsuf = p_su; *setsuf; )
       
    71       {
       
    72   	setsuflen = copy_option_part(&setsuf, suf_buf, MAXSUFLEN, ".,");
       
    73 ! 	if (setsuflen == 0)
       
    74 ! 	{
       
    75 ! 	    char_u *tail = gettail(fname);
       
    76 ! 
       
    77 ! 	    /* empty entry: match name without a '.' */
       
    78 ! 	    if (vim_strchr(tail, '.') == NULL)
       
    79 ! 	    {
       
    80 ! 		setsuflen = 1;
       
    81 ! 		break;
       
    82 ! 	    }
       
    83 ! 	}
       
    84 ! 	else
       
    85 ! 	{
       
    86 ! 	    if (fnamelen >= setsuflen
       
    87 ! 		    && fnamencmp(suf_buf, fname + fnamelen - setsuflen,
       
    88 ! 						  (size_t)setsuflen) == 0)
       
    89 ! 		break;
       
    90 ! 	    setsuflen = 0;
       
    91 ! 	}
       
    92       }
       
    93       return (setsuflen != 0);
       
    94   }
       
    95 *** ../vim-7.2.233/src/version.c	2009-07-14 18:38:09.000000000 +0200
       
    96 --- src/version.c	2009-07-14 21:38:30.000000000 +0200
       
    97 ***************
       
    98 *** 678,679 ****
       
    99 --- 678,681 ----
       
   100   {   /* Add new patch number below this line */
       
   101 + /**/
       
   102 +     234,
       
   103   /**/
       
   104 
       
   105 -- 
       
   106 How many light bulbs does it take to change a person?
       
   107 
       
   108  /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
       
   109 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
       
   110 \\\        download, build and distribute -- http://www.A-A-P.org        ///
       
   111  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///