diff options
author | Leonardo Mello <lsvmello@gmail.com> | 2023-10-03 19:04:19 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-04 06:04:19 +0800 |
commit | 1e7e9ee91f73c62b8c5ba9dbdabba3a3b6dc0130 (patch) | |
tree | 5c7d63563d97fbad676dfa651f5dcdc77689f254 /src/nvim/path.c | |
parent | e72b546354cd90bf0cd8ee6dd045538d713009ad (diff) | |
download | rneovim-1e7e9ee91f73c62b8c5ba9dbdabba3a3b6dc0130.tar.gz rneovim-1e7e9ee91f73c62b8c5ba9dbdabba3a3b6dc0130.tar.bz2 rneovim-1e7e9ee91f73c62b8c5ba9dbdabba3a3b6dc0130.zip |
fix(path): accept special characters on Windows (#25424)
Diffstat (limited to 'src/nvim/path.c')
-rw-r--r-- | src/nvim/path.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c index 21f0543756..5d991ce719 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -648,11 +648,13 @@ static size_t do_path_expand(garray_T *gap, const char *path, size_t wildoff, in } s = p + 1; } else if (path_end >= path + wildoff +#ifdef MSWIN + && vim_strchr("*?[~", (uint8_t)(*path_end)) != NULL +#else && (vim_strchr("*?[{~$", (uint8_t)(*path_end)) != NULL -#ifndef MSWIN - || (!p_fic && (flags & EW_ICASE) && mb_isalpha(utf_ptr2char(path_end))) + || (!p_fic && (flags & EW_ICASE) && mb_isalpha(utf_ptr2char(path_end)))) #endif - )) { // NOLINT(whitespace/parens) + ) { // NOLINT(whitespace/parens) e = p; } len = (size_t)(utfc_ptr2len(path_end)); |