mirror of
https://github.com/neovim/neovim.git
synced 2026-03-31 12:52:13 +00:00
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:
@@ -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
|
||||
) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user