]> granicus.if.org Git - vim/commitdiff
patch 7.4.1117 v7.4.1117
authorBram Moolenaar <Bram@vim.org>
Sun, 17 Jan 2016 16:04:05 +0000 (17:04 +0100)
committerBram Moolenaar <Bram@vim.org>
Sun, 17 Jan 2016 16:04:05 +0000 (17:04 +0100)
Problem:    No longer get "." and ".." in directory list.
Solution:   Do not skip "." and ".." unless EW_DODOT is set.

src/misc1.c
src/version.c

index 66569d4a0940013bb2f5c526547b857206e19c7e..fd63ec37f6bb9865e00f1ffbdff7381c1a502451 100644 (file)
@@ -10013,7 +10013,7 @@ dos_expandpath(
        if (p[0] == '*' && p[1] == '*')
            starstar = TRUE;
 
-    starts_with_dot = *s == '.' || (flags & EW_DODOT);
+    starts_with_dot = *s == '.';
     pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
     if (pat == NULL)
     {
@@ -10096,8 +10096,9 @@ dos_expandpath(
 #endif
        /* Ignore entries starting with a dot, unless when asked for.  Accept
         * all entries found with "matchname". */
-       if ((p[0] != '.' || (starts_with_dot
-                       && p[1] != NUL && (p[1] != '.' || p[2] != NUL)))
+       if ((p[0] != '.' || starts_with_dot
+                        || ((flags & EW_DODOT)
+                            && p[1] != NUL && (p[1] != '.' || p[2] != NUL)))
                && (matchname == NULL
                  || (regmatch.regprog != NULL
                                     && vim_regexec(&regmatch, p, (colnr_T)0))
@@ -10326,7 +10327,7 @@ unix_expandpath(gap, path, wildoff, flags, didstar)
            starstar = TRUE;
 
     /* convert the file pattern to a regexp pattern */
-    starts_with_dot = *s == '.' || (flags & EW_DODOT);
+    starts_with_dot = *s == '.';
     pat = file_pat_to_reg_pat(s, e, NULL, FALSE);
     if (pat == NULL)
     {
@@ -10375,9 +10376,10 @@ unix_expandpath(gap, path, wildoff, flags, didstar)
            dp = readdir(dirp);
            if (dp == NULL)
                break;
-           if ((dp->d_name[0] != '.' || (starts_with_dot
-                       && dp->d_name[1] != NUL
-                       && (dp->d_name[1] != '.' || dp->d_name[2] != NUL)))
+           if ((dp->d_name[0] != '.' || starts_with_dot
+                       || ((flags & EW_DODOT)
+                           && dp->d_name[1] != NUL
+                           && (dp->d_name[1] != '.' || dp->d_name[2] != NUL)))
                 && ((regmatch.regprog != NULL && vim_regexec(&regmatch,
                                             (char_u *)dp->d_name, (colnr_T)0))
                   || ((flags & EW_NOTWILD)
index 50a682719400ca299844237d0a78630038429164..ee4ec0e016d89e8352e6c6cd8a26c382d59f5cf6 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1117,
 /**/
     1116,
 /**/