mirror of
https://github.com/vim/vim.git
synced 2025-11-16 23:24:03 -05:00
patch 9.1.1646: MS-Windows: completion cannot handle implicit drive letters
Problem: MS-Windows: completion cannot handle implicit drive letters
Solution: Consider paths like \folder and /folder as absolute
(Miguel Barro).
closes: #17829
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
59799f3afa
commit
a2f13bf782
@@ -319,6 +319,7 @@ mch_FullName(
|
||||
mch_isFullName(char_u *fname)
|
||||
{
|
||||
// A name like "d:/foo" and "//server/share" is absolute. "d:foo" is not.
|
||||
// /foo and \foo are absolute too because windows keeps a current drive.
|
||||
// Another way to check is to use mch_FullName() and see if the result is
|
||||
// the same as the name or mch_FullName() fails. However, this has quite a
|
||||
// bit of overhead, so let's not do that.
|
||||
@@ -326,7 +327,7 @@ mch_isFullName(char_u *fname)
|
||||
return FALSE;
|
||||
return ((ASCII_ISALPHA(fname[0]) && fname[1] == ':'
|
||||
&& (fname[2] == '/' || fname[2] == '\\'))
|
||||
|| (fname[0] == fname[1] && (fname[0] == '/' || fname[0] == '\\')));
|
||||
|| (fname[0] == '/' || fname[0] == '\\'));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user