vim-patch:9.1.1648: MS-Windows: some style issues with patch v9.1.1646

Problem:  MS-Windows: some style issues with patch v9.1.1646
Solution: Fix typose and code style issues (zeertzjq).

closes: vim/vim#18036

14afa278c1
This commit is contained in:
zeertzjq
2026-01-04 18:48:34 +08:00
parent 43bf045005
commit 3e57c5216f
3 changed files with 5 additions and 5 deletions

View File

@@ -112,7 +112,7 @@ repeat:
// FullName_save() is slow, don't use it when not needed.
if (*p != NUL || !vim_isAbsName(*fnamep)
#ifdef MSWIN // enforce drive letter on windows paths
#ifdef MSWIN // enforce drive letter on Windows paths
|| **fnamep == '/' || **fnamep == '\\'
#endif
) {

View File

@@ -381,7 +381,7 @@ int path_fnamencmp(const char *const fname1, const char *const fname2, size_t le
const char *p2 = fname2;
# ifdef MSWIN
// To allow proper comparisson of absolute paths:
// To allow proper comparison of absolute paths:
// - one with explicit drive letter C:\xxx
// - another with implicit drive letter \xxx
// advance the pointer, of the explicit one, to skip the drive
@@ -396,7 +396,7 @@ int path_fnamencmp(const char *const fname1, const char *const fname2, size_t le
// Check for the colon
p2 += utfc_ptr2len(p2);
c2 = utf_ptr2char(p2);
if (c2 == ':' && drive == _getdrive()) { // skip the drive for comparisson
if (c2 == ':' && drive == _getdrive()) { // skip the drive for comparison
p2 += utfc_ptr2len(p2);
break;
} else { // ignore
@@ -2415,7 +2415,7 @@ bool path_is_absolute(const char *fname)
return false;
}
// A name like "d:/foo" and "//server/share" is absolute
// /foo and \foo are absolute too because windows keeps a current drive.
// /foo and \foo are absolute too because Windows keeps a current drive.
return ((ASCII_ISALPHA(fname[0]) && fname[1] == ':' && vim_ispathsep_nocolon(fname[2]))
|| vim_ispathsep_nocolon(fname[0]));
#else

View File

@@ -226,7 +226,7 @@ func Test_cd_completion()
set cdpath&
if has('win32')
" Test windows absolute path completion
" Test Windows absolute path completion
" Retrieve a suitable dir in the current drive
let dir = readdir('/', 'isdirectory("/" .. v:val) && len(v:val) > 2')[-1]
" Get partial path