summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBram Moolenaar <bram@vim.org>2010-09-14 12:47:37 +0200
committerBram Moolenaar <bram@vim.org>2010-09-14 12:47:37 +0200
commit20f9f0af655e370c1d4d8fdac1d73d6b3256b79e (patch)
tree89fb0eec9adec11e68eb9dbb69820adda46d7728
parent91285e39557433fc96e114e0eb17765eb55acfa6 (diff)
downloadvim-20f9f0af655e370c1d4d8fdac1d73d6b3256b79e.tar.gz
updated for version 7.3.005v7.3.005v7-3-005
Problem: Crash when using undotree(). (Christian Brabandt) Solution: Increase the list reference count. Add a test for undotree() (Lech Lorens)
-rw-r--r--src/eval.c3
-rw-r--r--src/testdir/Makefile2
-rw-r--r--src/testdir/test61.in4
-rw-r--r--src/version.c2
4 files changed, 9 insertions, 2 deletions
diff --git a/src/eval.c b/src/eval.c
index fc01006f..0f306d46 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -7075,7 +7075,7 @@ dict_add_nr_str(d, key, nr, str)
}
/*
- * Add a list entry to dictionary "d".
+ * Add a list entry to dictionary "d".
* Returns FAIL when out of memory and when key already exists.
*/
int
@@ -7097,6 +7097,7 @@ dict_add_list(d, key, list)
dictitem_free(item);
return FAIL;
}
+ ++list->lv_refcount;
return OK;
}
diff --git a/src/testdir/Makefile b/src/testdir/Makefile
index 4951dc2f..bdc2c28c 100644
--- a/src/testdir/Makefile
+++ b/src/testdir/Makefile
@@ -44,7 +44,7 @@ report:
$(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
clean:
- -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* valgrind.pid* viminfo
+ -rm -rf *.out *.failed *.rej *.orig test.log tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* valgrind.* viminfo
test1.out: test1.in
-rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo
diff --git a/src/testdir/test61.in b/src/testdir/test61.in
index f9a15746..88831636 100644
--- a/src/testdir/test61.in
+++ b/src/testdir/test61.in
@@ -4,6 +4,10 @@ undo-able pieces. Do that by setting 'undolevels'.
Also tests :earlier and :later.
STARTTEST
+:echo undotree().entries
+ENDTEST
+
+STARTTEST
:" Delete three characters and undo
Gx:set ul=100
x:set ul=100
diff --git a/src/version.c b/src/version.c
index 3b50ffb9..a1b3718c 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 5,
+/**/
4,
/**/
3,