From 372bcceeee8012ef3fb2f3dbc8132c3a33cb84fc Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Mon, 25 Apr 2022 12:43:20 +0100 Subject: patch 8.2.4823: concat more than 2 strings in :def function is inefficient Problem: Concatenating more than 2 strings in a :def function is inefficient. Solution: Add a count to the CONCAT instruction. (closes #10276) --- src/vim9cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/vim9cmds.c') diff --git a/src/vim9cmds.c b/src/vim9cmds.c index a853d9b0b..ad32c32ff 100644 --- a/src/vim9cmds.c +++ b/src/vim9cmds.c @@ -2125,7 +2125,7 @@ compile_redir(char_u *line, exarg_T *eap, cctx_T *cctx) generate_instr_type(cctx, ISN_REDIREND, &t_string); if (lhs->lhs_append) - generate_instr_drop(cctx, ISN_CONCAT, 1); + generate_CONCAT(cctx, 2); if (lhs->lhs_has_index) { -- cgit v1.2.1