aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarco Hinz <mh.codebro@gmail.com>2015-04-16 14:08:37 +0200
committerJustin M. Keyes <justinkz@gmail.com>2015-04-16 20:15:31 -0400
commitc1a3d289d69b93092247e0eca3bf4b43992791a1 (patch)
treed33ae0c69563ef0cf9f51022d61b9994443f07c8 /src
parent1b07f5711c4205bd22fd584afca7cfe7b99f45b3 (diff)
downloadrneovim-c1a3d289d69b93092247e0eca3bf4b43992791a1.tar.gz
rneovim-c1a3d289d69b93092247e0eca3bf4b43992791a1.tar.bz2
rneovim-c1a3d289d69b93092247e0eca3bf4b43992791a1.zip
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 https://github.com/vim/vim/commit/5216f767d4070d0085de6fa1391e6f2991c1baa5
Diffstat (limited to 'src')
-rw-r--r--src/nvim/eval.c4
-rw-r--r--src/nvim/version.c29
2 files changed, 33 insertions, 0 deletions
diff --git a/src/nvim/eval.c b/src/nvim/eval.c
index 1dab9df9cb..d6a8351330 100644
--- a/src/nvim/eval.c
+++ b/src/nvim/eval.c
@@ -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)
{
+ if (l->lv_len < 1) {
+ return OK;
+ }
+
garray_T join_ga;
int retval;
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 49f374bce4..bccce50ece 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -67,6 +67,35 @@ static char *features[] = {
// clang-format off
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,
//672,
//671,