To: vim-dev@vim.org Subject: Patch 7.0.120 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.0.120 Problem: Crash when using CTRL-R = at the command line and entering "getreg('=')". (James Vega) Solution: Avoid recursiveness of evaluating the = register. Files: src/ops.c *** ../vim-7.0.119/src/ops.c Sun Jul 23 22:37:29 2006 --- src/ops.c Fri Oct 6 21:27:40 2006 *************** *** 770,775 **** --- 770,776 ---- { char_u *expr_copy; char_u *rv; + static int nested = 0; if (expr_line == NULL) return NULL; *************** *** 780,786 **** --- 781,794 ---- 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; } *** ../vim-7.0.119/src/version.c Fri Oct 6 20:39:58 2006 --- src/version.c Fri Oct 6 21:31:56 2006 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 120, /**/ -- hundred-and-one symptoms of being an internet addict: 16. You step out of your room and realize that your parents have moved and you don't have a clue when it happened. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///