mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 07:48:18 +00:00
Eval: do not join a list if it's empty anyway #2441
This spares some work and also prevents list_join() from calling ga_init()
with a growsize of 0 which would lead to the nvimlog being littered with:
[warning @ ga_set_growsize:64] 17675 - trying to set an invalid ga_growsize: 0
Also in Vim 7.4.702
5216f767d4
This commit is contained in:

committed by
Justin M. Keyes

parent
1b07f5711c
commit
c1a3d289d6
@@ -5418,6 +5418,10 @@ list_join_inner (
|
|||||||
*/
|
*/
|
||||||
static int list_join(garray_T *gap, list_T *l, char_u *sep, int echo_style, int copyID)
|
static int list_join(garray_T *gap, list_T *l, char_u *sep, int echo_style, int copyID)
|
||||||
{
|
{
|
||||||
|
if (l->lv_len < 1) {
|
||||||
|
return OK;
|
||||||
|
}
|
||||||
|
|
||||||
garray_T join_ga;
|
garray_T join_ga;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
|
@@ -67,6 +67,35 @@ static char *features[] = {
|
|||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
static int included_patches[] = {
|
static int included_patches[] = {
|
||||||
|
702,
|
||||||
|
//701,
|
||||||
|
//700,
|
||||||
|
//699,
|
||||||
|
//698,
|
||||||
|
//697,
|
||||||
|
//696,
|
||||||
|
//695,
|
||||||
|
//694,
|
||||||
|
//693,
|
||||||
|
//692,
|
||||||
|
//691,
|
||||||
|
//690,
|
||||||
|
//689,
|
||||||
|
//688,
|
||||||
|
//687,
|
||||||
|
//686,
|
||||||
|
//685,
|
||||||
|
//684,
|
||||||
|
//683,
|
||||||
|
//682,
|
||||||
|
//681,
|
||||||
|
//680,
|
||||||
|
//679,
|
||||||
|
//678,
|
||||||
|
//677,
|
||||||
|
//676,
|
||||||
|
//675,
|
||||||
|
//674,
|
||||||
673,
|
673,
|
||||||
//672,
|
//672,
|
||||||
//671,
|
//671,
|
||||||
|
Reference in New Issue
Block a user