Mercurial > vim
comparison src/ex_getln.c @ 1432:bca50c9e1374 v7.1.147
updated for version 7.1-147
author | vimboss |
---|---|
date | Tue, 30 Oct 2007 16:37:15 +0000 |
parents | 45ba31f9ba0c |
children | a73a117542b8 |
comparison
equal
deleted
inserted
replaced
1431:d065616e0836 | 1432:bca50c9e1374 |
---|---|
3351 int mode; | 3351 int mode; |
3352 { | 3352 { |
3353 char_u *ss = NULL; | 3353 char_u *ss = NULL; |
3354 static int findex; | 3354 static int findex; |
3355 static char_u *orig_save = NULL; /* kept value of orig */ | 3355 static char_u *orig_save = NULL; /* kept value of orig */ |
3356 int orig_saved = FALSE; | |
3356 int i; | 3357 int i; |
3357 long_u len; | 3358 long_u len; |
3358 int non_suf_match; /* number without matching suffix */ | 3359 int non_suf_match; /* number without matching suffix */ |
3359 | 3360 |
3360 /* | 3361 /* |
3419 | 3420 |
3420 if (xp->xp_numfiles == -1) | 3421 if (xp->xp_numfiles == -1) |
3421 { | 3422 { |
3422 vim_free(orig_save); | 3423 vim_free(orig_save); |
3423 orig_save = orig; | 3424 orig_save = orig; |
3425 orig_saved = TRUE; | |
3424 | 3426 |
3425 /* | 3427 /* |
3426 * Do the expansion. | 3428 * Do the expansion. |
3427 */ | 3429 */ |
3428 if (ExpandFromContext(xp, str, &xp->xp_numfiles, &xp->xp_files, | 3430 if (ExpandFromContext(xp, str, &xp->xp_numfiles, &xp->xp_files, |
3544 | 3546 |
3545 if (mode == WILD_EXPAND_FREE || mode == WILD_ALL) | 3547 if (mode == WILD_EXPAND_FREE || mode == WILD_ALL) |
3546 ExpandCleanup(xp); | 3548 ExpandCleanup(xp); |
3547 | 3549 |
3548 /* Free "orig" if it wasn't stored in "orig_save". */ | 3550 /* Free "orig" if it wasn't stored in "orig_save". */ |
3549 if (orig != orig_save) | 3551 if (!orig_saved) |
3550 vim_free(orig); | 3552 vim_free(orig); |
3551 | 3553 |
3552 return ss; | 3554 return ss; |
3553 } | 3555 } |
3554 | 3556 |