# HG changeset patch # User Bram Moolenaar # Date 1429217482 -7200 # Node ID 203888fa7192572d8bc96ee115825311c867fc47 # Parent d4bb6110de586b3c989a855d1cdad25a691946ea patch 7.4.702 Problem: Joining an empty list does uneccessary work. Solution: Let join() return early. (Marco Hinz) diff --git a/src/eval.c b/src/eval.c --- a/src/eval.c +++ b/src/eval.c @@ -6780,6 +6780,8 @@ list_join(gap, l, sep, echo_style, copyI join_T *p; int i; + if (l->lv_len < 1) + return OK; /* nothing to do */ ga_init2(&join_ga, (int)sizeof(join_T), l->lv_len); retval = list_join_inner(gap, l, sep, echo_style, copyID, &join_ga); diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 702, +/**/ 701, /**/ 700,