To: vim_dev@googlegroups.com Subject: Patch 8.2.1421 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.1421 Problem: Vim9: handling "+" and "-" before number differs from Vim script. Solution: Use the same sequence of commands. Files: src/vim9compile.c *** ../vim-8.2.1420/src/vim9compile.c 2020-08-10 23:09:33.761270906 +0200 --- src/vim9compile.c 2020-08-11 20:49:21.437086742 +0200 *************** *** 3206,3211 **** --- 3206,3220 ---- case '9': case '.': if (eval_number(arg, rettv, TRUE, FALSE) == FAIL) return FAIL; + // Apply "-" and "+" just before the number now, right to + // left. Matters especially when "->" follows. Stops at + // '!'. + if (apply_leader(rettv, TRUE, + start_leader, &end_leader) == FAIL) + { + clear_tv(rettv); + return FAIL; + } break; /* *************** *** 3344,3356 **** if (rettv->v_type != VAR_UNKNOWN && used_before == ppconst->pp_used) { - // apply the '-' and '+' before the constant, but not '!' - if (apply_leader(rettv, TRUE, start_leader, &end_leader) == FAIL) - { - clear_tv(rettv); - return FAIL; - } - if (cctx->ctx_skip == SKIP_YES) clear_tv(rettv); else --- 3353,3358 ---- *** ../vim-8.2.1420/src/version.c 2020-08-11 20:42:15.470616304 +0200 --- src/version.c 2020-08-11 20:50:38.373632663 +0200 *************** *** 756,757 **** --- 756,759 ---- { /* Add new patch number below this line */ + /**/ + 1421, /**/ -- hundred-and-one symptoms of being an internet addict: 174. You know what a listserv is. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///