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.
9eb76af451
This commit is contained in:
zeertzjq
2021-10-17 22:04:53 +08:00
parent e91dee5c21
commit 57651df9c1
4 changed files with 70 additions and 11 deletions

View File

@@ -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 {