comparison src/misc1.c @ 13180:0dfd846f9190 v8.0.1464

patch 8.0.1464: completing directory after :find does not add slash commit https://github.com/vim/vim/commit/8a37b032895b40dd6953280c33585bcba0c7ef8b Author: Bram Moolenaar <Bram@vim.org> Date: Sat Feb 3 20:43:08 2018 +0100 patch 8.0.1464: completing directory after :find does not add slash Problem: Completing directory after :find does not add slash. Solution: Adjust the flags for globpath(). (Genki Sky)
author Christian Brabandt <cb@256bit.org>
date Sat, 03 Feb 2018 20:45:06 +0100
parents a80082fd1a1d
children a49a5419a83f
comparison
equal deleted inserted replaced
13179:32d3b42f9524 13180:0dfd846f9190
10759 int flags) /* EW_* flags */ 10759 int flags) /* EW_* flags */
10760 { 10760 {
10761 char_u *curdir; 10761 char_u *curdir;
10762 garray_T path_ga; 10762 garray_T path_ga;
10763 char_u *paths = NULL; 10763 char_u *paths = NULL;
10764 int glob_flags = 0;
10764 10765
10765 if ((curdir = alloc((unsigned)MAXPATHL)) == NULL) 10766 if ((curdir = alloc((unsigned)MAXPATHL)) == NULL)
10766 return 0; 10767 return 0;
10767 mch_dirname(curdir, MAXPATHL); 10768 mch_dirname(curdir, MAXPATHL);
10768 10769
10775 paths = ga_concat_strings(&path_ga, ","); 10776 paths = ga_concat_strings(&path_ga, ",");
10776 ga_clear_strings(&path_ga); 10777 ga_clear_strings(&path_ga);
10777 if (paths == NULL) 10778 if (paths == NULL)
10778 return 0; 10779 return 0;
10779 10780
10780 globpath(paths, pattern, gap, (flags & EW_ICASE) ? WILD_ICASE : 0); 10781 if (flags & EW_ICASE)
10782 glob_flags |= WILD_ICASE;
10783 if (flags & EW_ADDSLASH)
10784 glob_flags |= WILD_ADD_SLASH;
10785 globpath(paths, pattern, gap, glob_flags);
10781 vim_free(paths); 10786 vim_free(paths);
10782 10787
10783 return gap->ga_len; 10788 return gap->ga_len;
10784 } 10789 }
10785 #endif 10790 #endif