mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
Fix get_path_cutoff() on Windows
Fix an issue where the result of get_path cutoff() was incorrect when using set shellslash.
This commit is contained in:
@@ -852,8 +852,13 @@ static char_u *get_path_cutoff(char_u *fname, garray_T *gap)
|
|||||||
int j = 0;
|
int j = 0;
|
||||||
|
|
||||||
while ((fname[j] == path_part[i][j]
|
while ((fname[j] == path_part[i][j]
|
||||||
) && fname[j] != NUL && path_part[i][j] != NUL)
|
#ifdef WIN32
|
||||||
|
|| (vim_ispathsep(fname[j]) && vim_ispathsep(path_part[i][j]))
|
||||||
|
#endif
|
||||||
|
) // NOLINT(whitespace/parens)
|
||||||
|
&& fname[j] != NUL && path_part[i][j] != NUL) {
|
||||||
j++;
|
j++;
|
||||||
|
}
|
||||||
if (j > maxlen) {
|
if (j > maxlen) {
|
||||||
maxlen = j;
|
maxlen = j;
|
||||||
cutoff = &fname[j];
|
cutoff = &fname[j];
|
||||||
|
Reference in New Issue
Block a user