mirror of
https://github.com/neovim/neovim.git
synced 2025-12-03 07:23:05 +00:00
vim-patch:8.2.0215: wrong file name shortening
Problem: Wrong file name shortening. (Ingo Karkat)
Solution: Better check for path separator. (Yasuhiro Matsumoto,
closes vim/vim#5583, closes vim/vim#5584)
a78e9c61a0
This commit is contained in:
@@ -10725,14 +10725,17 @@ repeat:
|
||||
// even though the path does not have a prefix.
|
||||
if (fnamencmp(p, dirname, namelen) == 0) {
|
||||
p += namelen;
|
||||
while (*p && vim_ispathsep(*p)) {
|
||||
++p;
|
||||
}
|
||||
*fnamep = p;
|
||||
if (pbuf != NULL) {
|
||||
xfree(*bufp); // free any allocated file name
|
||||
*bufp = pbuf;
|
||||
pbuf = NULL;
|
||||
if (vim_ispathsep(*p)) {
|
||||
while (*p && vim_ispathsep(*p)) {
|
||||
p++;
|
||||
}
|
||||
*fnamep = p;
|
||||
if (pbuf != NULL) {
|
||||
// free any allocated file name
|
||||
xfree(*bufp);
|
||||
*bufp = pbuf;
|
||||
pbuf = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user