0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.1.2125: fnamemodify() fails when repeating :e

Problem:    Fnamemodify() fails when repeating :e.
Solution:   Do not go before the tail. (Rob Pilling, closes #5024)
This commit is contained in:
Bram Moolenaar
2019-10-08 23:26:50 +02:00
parent 345f28df54
commit b189295b72
3 changed files with 35 additions and 1 deletions

View File

@@ -563,7 +563,11 @@ repeat:
}
else // :r
{
if (s > tail) // remove one extension
char_u *limit = *fnamep;
if (limit < tail)
limit = tail;
if (s > limit) // remove one extension
*fnamelen = (int)(s - *fnamep);
}
*usedlen += 2;