mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06: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:
parent
d7b642cadb
commit
505d5fb960
@ -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];
|
||||||
|
Loading…
Reference in New Issue
Block a user