0
0
mirror of https://github.com/vim/vim.git synced 2025-09-25 03:54:15 -04:00

updated for version 7.0-120

This commit is contained in:
Bram Moolenaar
2006-10-06 21:33:16 +00:00
parent c0a0ab5c54
commit 21bffa7550
2 changed files with 10 additions and 0 deletions

View File

@@ -770,6 +770,7 @@ get_expr_line()
{
char_u *expr_copy;
char_u *rv;
static int nested = 0;
if (expr_line == NULL)
return NULL;
@@ -780,7 +781,14 @@ get_expr_line()
if (expr_copy == NULL)
return NULL;
/* When we are invoked recursively limit the evaluation to 10 levels.
* Then return the string as-is. */
if (nested >= 10)
return expr_copy;
++nested;
rv = eval_to_string(expr_copy, NULL, TRUE);
--nested;
vim_free(expr_copy);
return rv;
}