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

patch 9.0.0231: expanding "**" may loop forever with directory links

Problem:    Expanding "**" may loop forever with directory links.
Solution:   Check for being interrupted. (closes #10946)
This commit is contained in:
Bram Moolenaar
2022-08-20 19:26:14 +01:00
parent 2984ed31d9
commit 57e95179ab
3 changed files with 12 additions and 6 deletions

View File

@@ -722,8 +722,9 @@ ExpandOne(
findex = -1; // next p_wc gets first one
}
// Concatenate all matching names
if (mode == WILD_ALL && xp->xp_numfiles > 0)
// Concatenate all matching names. Unless interrupted, this can be slow
// and the result probably won't be used.
if (mode == WILD_ALL && xp->xp_numfiles > 0 && !got_int)
{
len = 0;
for (i = 0; i < xp->xp_numfiles; ++i)