diff options
author | Bram Moolenaar <Bram@vim.org> | 2015-04-16 22:51:22 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2015-04-16 22:51:22 +0200 |
commit | d39a7512804f860a20319c181613771a79a9ea4e (patch) | |
tree | 21a9a78e28c54b0f7865ec195ea4eb9bd91f1cc6 | |
parent | ec45c4a6dfd8acf52c8d1412188f54f79dde895e (diff) |
patch 7.4.702v7.4.702
Problem: Joining an empty list does uneccessary work.
Solution: Let join() return early. (Marco Hinz)
-rw-r--r-- | src/eval.c | 2 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/eval.c b/src/eval.c index f9df76350c..b80762e12d 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 3f913caf99..0f02ea8ff0 100644 --- 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, |