aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerw7 <erw7.github@gmail.com>2021-02-24 20:13:01 +0900
committererw7 <erw7.github@gmail.com>2021-02-25 13:50:31 +0900
commit34d12e7dd732632d9fa89312aa51203e2a80faf4 (patch)
treefad6d3f195ab100edc79e8737f6f146fc83b561d
parent6deabca3e7da055bc2b26b795f2e2e98b3c70d4e (diff)
downloadrneovim-34d12e7dd732632d9fa89312aa51203e2a80faf4.tar.gz
rneovim-34d12e7dd732632d9fa89312aa51203e2a80faf4.tar.bz2
rneovim-34d12e7dd732632d9fa89312aa51203e2a80faf4.zip
path.c: fix path_fnamencmp
Fix the problem that the last comparison of strings when p_fic is true was not ignore case.
-rw-r--r--src/nvim/path.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/path.c b/src/nvim/path.c
index 2de7e00ddb..3e1713fbdd 100644
--- a/src/nvim/path.c
+++ b/src/nvim/path.c
@@ -342,7 +342,7 @@ int path_fnamencmp(const char *const fname1, const char *const fname2,
p1 += utfc_ptr2len((const char_u *)p1);
p2 += utfc_ptr2len((const char_u *)p2);
}
- return c1 - c2;
+ return p_fic ? CH_FOLD(c1) - CH_FOLD(c2) : c1 - c2;
#else
if (p_fic) {
return mb_strnicmp((const char_u *)fname1, (const char_u *)fname2, len);