mirror of
https://github.com/vim/vim.git
synced 2025-09-23 03:43:49 -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;
|
||||
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);
|
||||
|
||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
702,
|
||||
/**/
|
||||
701,
|
||||
/**/
|
||||
|
Reference in New Issue
Block a user