aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/path.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-09-12 19:09:23 +0800
committerGitHub <noreply@github.com>2022-09-12 19:09:23 +0800
commita48e42a29d2eeef3f3ee0e7e1a89f981efa82d54 (patch)
tree753ce1b91ced3e24ac45c3b1266edf18a5acb092 /src/nvim/path.c
parent2ea6584a1b798bc7bb77d97735c77c0c7ce38706 (diff)
downloadrneovim-a48e42a29d2eeef3f3ee0e7e1a89f981efa82d54.tar.gz
rneovim-a48e42a29d2eeef3f3ee0e7e1a89f981efa82d54.tar.bz2
rneovim-a48e42a29d2eeef3f3ee0e7e1a89f981efa82d54.zip
vim-patch:8.2.4671: 'wildignorecase' is sometimes not used for glob() (#20165)
Problem: 'wildignorecase' is sometimes not used for glob(). Solution: Also use 'wildignorecase' when there are no wildcards. (closes vim/vim#10066, closes vim/vim#8350) https://github.com/vim/vim/commit/a3157a476bfa8c3077d510cc8400093c0d115df5
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r--src/nvim/path.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 38112be3ce..ac07fbee87 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -1272,12 +1272,12 @@ int gen_expand_wildcards(int num_pat, char **pat, int *num_file, char ***file, i
}
}
- // 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 (path_has_exp_wildcard(p)) {
+ // 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 (path_has_exp_wildcard(p) || (flags & EW_ICASE)) {
if ((flags & EW_PATH)
&& !path_is_absolute(p)
&& !(p[0] == '.'