Mercurial > vim
comparison src/ex_docmd.c @ 15188:2d8c31ae1e24 v8.1.0604
patch 8.1.0604: autocommand test fails on MS-Windows
commit https://github.com/vim/vim/commit/9eb76af451ddd8eaad0cd5dd629f18c4f4035171
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Dec 16 16:30:21 2018 +0100
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.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 16 Dec 2018 16:45:05 +0100 |
parents | 90ab2d3ce11d |
children | 95678f27a704 |
comparison
equal
deleted
inserted
replaced
15187:0cfd0fb15db0 | 15188:2d8c31ae1e24 |
---|---|
9183 # endif | 9183 # endif |
9184 new_dir = NameBuff; | 9184 new_dir = NameBuff; |
9185 } | 9185 } |
9186 #endif | 9186 #endif |
9187 dir_differs = new_dir == NULL || prev_dir == NULL | 9187 dir_differs = new_dir == NULL || prev_dir == NULL |
9188 || STRCMP(prev_dir, new_dir) != 0; | 9188 || pathcmp((char *)prev_dir, (char *)new_dir, -1) != 0; |
9189 if (new_dir == NULL || (dir_differs && vim_chdir(new_dir))) | 9189 if (new_dir == NULL || (dir_differs && vim_chdir(new_dir))) |
9190 EMSG(_(e_failed)); | 9190 EMSG(_(e_failed)); |
9191 else | 9191 else |
9192 { | 9192 { |
9193 int is_local_chdir = eap->cmdidx == CMD_lcd | 9193 int is_local_chdir = eap->cmdidx == CMD_lcd |