mirror of
https://github.com/vim/vim.git
synced 2025-10-07 05:54:16 -04:00
patch 7.4.702
Problem: Joining an empty list does uneccessary work. Solution: Let join() return early. (Marco Hinz)
This commit is contained in:
@@ -6780,6 +6780,8 @@ list_join(gap, l, sep, echo_style, copyID)
|
|||||||
join_T *p;
|
join_T *p;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (l->lv_len < 1)
|
||||||
|
return OK; /* nothing to do */
|
||||||
ga_init2(&join_ga, (int)sizeof(join_T), l->lv_len);
|
ga_init2(&join_ga, (int)sizeof(join_T), l->lv_len);
|
||||||
retval = list_join_inner(gap, l, sep, echo_style, copyID, &join_ga);
|
retval = list_join_inner(gap, l, sep, echo_style, copyID, &join_ga);
|
||||||
|
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
702,
|
||||||
/**/
|
/**/
|
||||||
701,
|
701,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user