aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-10-17 22:04:53 +0800
committerzeertzjq <zeertzjq@outlook.com>2021-10-17 22:04:53 +0800
commit57651df9c11740a24a2f71801d9b7b81b894d601 (patch)
treefe98c51fc2a7a9eca057ca112e5e16048f2eed0e /src/nvim/ex_docmd.c
parente91dee5c21ffca22ac821336ad23bce6339b5f7c (diff)
downloadrneovim-57651df9c11740a24a2f71801d9b7b81b894d601.tar.gz
rneovim-57651df9c11740a24a2f71801d9b7b81b894d601.tar.bz2
rneovim-57651df9c11740a24a2f71801d9b7b81b894d601.zip
vim-patch:8.1.0604: autocommand test fails on MS-Windows
Problem: Autocommand test fails on MS-Windows. Solution: Use pathcmp() instead of strcmp() to check if a directory differs. https://github.com/vim/vim/commit/9eb76af451ddd8eaad0cd5dd629f18c4f4035171
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index b81aab9ffe..cc30557ead 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -7811,7 +7811,7 @@ void ex_cd(exarg_T *eap)
break;
}
- bool dir_differs = prev_dir == NULL || STRCMP(prev_dir, new_dir) != 0;
+ bool dir_differs = prev_dir == NULL || pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0;
if (dir_differs && vim_chdir(new_dir)) {
EMSG(_(e_failed));
} else {