summaryrefslogtreecommitdiff
path: root/source/ap/vim/patches/7.3.399
blob: 33d063020e33d42f90ac90dcbc7c107899d439ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
To: vim_dev@googlegroups.com
Subject: Patch 7.3.399
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.399
Problem:    ":cd" doesn't work when the path contains wildcards. (Yukihiro
	    Nakadaira)
Solution:   Ignore wildcard errors when the EW_NOTWILD flag is used.
Files:	    src/misc1.c


*** ../vim-7.3.398/src/misc1.c	2011-12-14 20:21:29.000000000 +0100
--- src/misc1.c	2012-01-10 17:57:42.000000000 +0100
***************
*** 9103,9117 ****
      }
  
      /* compile the regexp into a program */
!     if (flags & EW_NOERROR)
  	++emsg_silent;
      regmatch.rm_ic = TRUE;		/* Always ignore case */
      regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
!     if (flags & EW_NOERROR)
  	--emsg_silent;
      vim_free(pat);
  
!     if (regmatch.regprog == NULL)
      {
  	vim_free(buf);
  	return 0;
--- 9103,9117 ----
      }
  
      /* compile the regexp into a program */
!     if (flags & (EW_NOERROR | EW_NOTWILD))
  	++emsg_silent;
      regmatch.rm_ic = TRUE;		/* Always ignore case */
      regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
!     if (flags & (EW_NOERROR | EW_NOTWILD))
  	--emsg_silent;
      vim_free(pat);
  
!     if (regmatch.regprog == NULL && (flags & EW_NOTWILD) == 0)
      {
  	vim_free(buf);
  	return 0;
***************
*** 9179,9185 ****
  	 * all entries found with "matchname". */
  	if ((p[0] != '.' || starts_with_dot)
  		&& (matchname == NULL
! 		  || vim_regexec(&regmatch, p, (colnr_T)0)
  		  || ((flags & EW_NOTWILD)
  		     && fnamencmp(path + (s - buf), p, e - s) == 0)))
  	{
--- 9179,9186 ----
  	 * all entries found with "matchname". */
  	if ((p[0] != '.' || starts_with_dot)
  		&& (matchname == NULL
! 		  || (regmatch.regprog != NULL
! 				     && vim_regexec(&regmatch, p, (colnr_T)0))
  		  || ((flags & EW_NOTWILD)
  		     && fnamencmp(path + (s - buf), p, e - s) == 0)))
  	{
***************
*** 9419,9428 ****
      else
  	regmatch.rm_ic = FALSE;		/* Don't ignore case */
  #endif
      regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
      vim_free(pat);
  
!     if (regmatch.regprog == NULL)
      {
  	vim_free(buf);
  	return 0;
--- 9420,9433 ----
      else
  	regmatch.rm_ic = FALSE;		/* Don't ignore case */
  #endif
+     if (flags & (EW_NOERROR | EW_NOTWILD))
+ 	++emsg_silent;
      regmatch.regprog = vim_regcomp(pat, RE_MAGIC);
+     if (flags & (EW_NOERROR | EW_NOTWILD))
+ 	--emsg_silent;
      vim_free(pat);
  
!     if (regmatch.regprog == NULL && (flags & EW_NOTWILD) == 0)
      {
  	vim_free(buf);
  	return 0;
***************
*** 9452,9458 ****
  	    if (dp == NULL)
  		break;
  	    if ((dp->d_name[0] != '.' || starts_with_dot)
! 		 && (vim_regexec(&regmatch, (char_u *)dp->d_name, (colnr_T)0)
  		   || ((flags & EW_NOTWILD)
  		     && fnamencmp(path + (s - buf), dp->d_name, e - s) == 0)))
  	    {
--- 9457,9464 ----
  	    if (dp == NULL)
  		break;
  	    if ((dp->d_name[0] != '.' || starts_with_dot)
! 		 && ((regmatch.regprog != NULL && vim_regexec(&regmatch,
! 					     (char_u *)dp->d_name, (colnr_T)0))
  		   || ((flags & EW_NOTWILD)
  		     && fnamencmp(path + (s - buf), dp->d_name, e - s) == 0)))
  	    {
*** ../vim-7.3.398/src/version.c	2012-01-10 17:13:48.000000000 +0100
--- src/version.c	2012-01-10 18:21:05.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     399,
  /**/

-- 
Close your shells, or I'll kill -9 you
Tomorrow I'll quota you
Remember the disks'll always be full
And then while I'm away
I'll write ~ everyday
And I'll send-pr all my buggings to you.
    [ CVS log "Beatles style" for FreeBSD ports/INDEX, Satoshi Asami ]

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///