mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.0-120
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user