vim-patch:7.4.1117

Problem:    No longer get "." and ".." in directory list.
Solution:   Do not skip "." and ".." unless EW_DODOT is set.

d82103ed85
This commit is contained in:
Jurica Bradaric
2016-02-28 13:21:01 +01:00
parent a252fca38e
commit 29b737e92b
2 changed files with 6 additions and 5 deletions

View File

@@ -604,7 +604,7 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
starstar = true; starstar = true;
// convert the file pattern to a regexp pattern // convert the file pattern to a regexp pattern
int starts_with_dot = *s == '.' || (flags & EW_DODOT); int starts_with_dot = *s == '.';
char_u *pat = file_pat_to_reg_pat(s, e, NULL, false); char_u *pat = file_pat_to_reg_pat(s, e, NULL, false);
if (pat == NULL) { if (pat == NULL) {
xfree(buf); xfree(buf);
@@ -649,9 +649,10 @@ static size_t do_path_expand(garray_T *gap, const char_u *path,
char_u *name; char_u *name;
scandir_next_with_dots(NULL); // initialize scandir_next_with_dots(NULL); // initialize
while ((name = (char_u *) scandir_next_with_dots(&dir)) && name != NULL) { while ((name = (char_u *) scandir_next_with_dots(&dir)) && name != NULL) {
if ((name[0] != '.' || (starts_with_dot if ((name[0] != '.'
&& name[1] != NUL || starts_with_dot
&& (name[1] != '.' || name[2] != NUL))) || ((flags & EW_DODOT)
&& name[1] != NUL && (name[1] != '.' || name[2] != NUL)))
&& ((regmatch.regprog != NULL && vim_regexec(&regmatch, name, 0)) && ((regmatch.regprog != NULL && vim_regexec(&regmatch, name, 0))
|| ((flags & EW_NOTWILD) || ((flags & EW_NOTWILD)
&& fnamencmp(path + (s - buf), name, e - s) == 0))) { && fnamencmp(path + (s - buf), name, e - s) == 0))) {

View File

@@ -247,7 +247,7 @@ static int included_patches[] = {
// 1120, // 1120,
// 1119, // 1119,
// 1118, // 1118,
// 1117, 1117,
1116, 1116,
// 1115 NA // 1115 NA
1114, 1114,