mirror of
https://github.com/vim/vim.git
synced 2025-11-15 23:14:06 -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
@@ -398,18 +398,6 @@ vim_findfile_init(
|
||||
search_ctx->ffsc_start_dir.length);
|
||||
if (search_ctx->ffsc_start_dir.string == NULL)
|
||||
goto error_return;
|
||||
|
||||
#ifdef BACKSLASH_IN_FILENAME
|
||||
// A path that starts with "/dir" is relative to the drive, not to the
|
||||
// directory (but not for "//machine/dir"). Only use the drive name.
|
||||
if ((*path == '/' || *path == '\\')
|
||||
&& path[1] != path[0]
|
||||
&& search_ctx->ffsc_start_dir.string[1] == ':')
|
||||
{
|
||||
search_ctx->ffsc_start_dir.string[2] = NUL;
|
||||
search_ctx->ffsc_start_dir.length = 2;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user