summaryrefslogtreecommitdiffstats
path: root/src/filepath.c
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2022-04-03 11:58:31 +0100
committerBram Moolenaar <Bram@vim.org>2022-04-03 11:58:31 +0100
commita3157a476bfa8c3077d510cc8400093c0d115df5 (patch)
tree0901d5e5d41710e7651f477f6ad756ce07753a3e /src/filepath.c
parent72bb47e38f6805050ed6d969f17591bed71f83d4 (diff)
patch 8.2.4671: 'wildignorecase' is sometimes not used for glob()v8.2.4671
Problem: 'wildignorecase' is sometimes not used for glob(). Solution: Also use 'wildignorecase' when there are no wildcards. (closes #10066, closes #8350)
Diffstat (limited to 'src/filepath.c')
-rw-r--r--src/filepath.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/filepath.c b/src/filepath.c
index 851091e57a..5bf31ea8e8 100644
--- a/src/filepath.c
+++ b/src/filepath.c
@@ -3945,13 +3945,13 @@ gen_expand_wildcards(
}
/*
- * If there are wildcards: Expand file names and add each match to
- * the list. If there is no match, and EW_NOTFOUND is given, add
- * the pattern.
- * If there are no wildcards: Add the file name if it exists or
- * when EW_NOTFOUND is given.
+ * If there are wildcards or case-insensitive expansion is
+ * required: Expand file names and add each match to the list. If
+ * there is no match, and EW_NOTFOUND is given, add the pattern.
+ * Otherwise: Add the file name if it exists or when EW_NOTFOUND is
+ * given.
*/
- if (mch_has_exp_wildcard(p))
+ if (mch_has_exp_wildcard(p) || (flags & EW_ICASE))
{
#if defined(FEAT_SEARCHPATH)
if ((flags & EW_PATH)