From d39a7512804f860a20319c181613771a79a9ea4e Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Thu, 16 Apr 2015 22:51:22 +0200 Subject: patch 7.4.702 Problem: Joining an empty list does uneccessary work. Solution: Let join() return early. (Marco Hinz) --- src/eval.c | 2 ++ src/version.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/eval.c b/src/eval.c index f9df76350..b80762e12 100644 --- a/src/eval.c +++ b/src/eval.c @@ -6780,6 +6780,8 @@ list_join(gap, l, sep, echo_style, copyID) 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 index 3f913caf9..0f02ea8ff 100644 --- a/src/version.c +++ b/src/version.c @@ -741,6 +741,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 702, /**/ 701, /**/ -- cgit v1.2.1