0
0
mirror of https://github.com/vim/vim.git synced 2025-10-24 08:54:47 -04: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:
Miguel Barro
2025-08-17 22:04:24 +02:00
committed by Christian Brabandt
parent 59799f3afa
commit a2f13bf782
9 changed files with 88 additions and 24 deletions

View File

@@ -5472,7 +5472,8 @@ fix_fname(char_u *fname)
* Also expand when there is ".." in the file name, try to remove it,
* because "c:/src/../README" is equal to "c:/README".
* Similarly "c:/src//file" is equal to "c:/src/file".
* For MS-Windows also expand names like "longna~1" to "longname".
* For MS-Windows also expand names like "longna~1" to "longname"
* and provide drive letter for all absolute paths.
*/
#ifdef UNIX
return FullName_save(fname, TRUE);
@@ -5485,6 +5486,8 @@ fix_fname(char_u *fname)
# endif
# if defined(MSWIN)
|| vim_strchr(fname, '~') != NULL
|| fname[0] == '/'
|| fname[0] == '\\'
# endif
)
return FullName_save(fname, FALSE);