0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

updated for version 7.3.005

Problem:    Crash when using undotree(). (Christian Brabandt)
Solution:   Increase the list reference count.  Add a test for undotree()
            (Lech Lorens)
This commit is contained in:
Bram Moolenaar
2010-09-14 12:47:37 +02:00
parent 73a92fe013
commit 217d285fdd
4 changed files with 9 additions and 2 deletions

View File

@@ -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. * Returns FAIL when out of memory and when key already exists.
*/ */
int int
@@ -7097,6 +7097,7 @@ dict_add_list(d, key, list)
dictitem_free(item); dictitem_free(item);
return FAIL; return FAIL;
} }
++list->lv_refcount;
return OK; return OK;
} }

View File

@@ -44,7 +44,7 @@ report:
$(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG) $(SCRIPTS) $(SCRIPTS_GUI): $(VIMPROG)
clean: 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 test1.out: test1.in
-rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo -rm -f $*.failed tiny.vim small.vim mbyte.vim mzscheme.vim test.ok X* viminfo

View File

@@ -3,6 +3,10 @@ Since this script is sourced we need to explicitly break changes up in
undo-able pieces. Do that by setting 'undolevels'. undo-able pieces. Do that by setting 'undolevels'.
Also tests :earlier and :later. Also tests :earlier and :later.
STARTTEST
:echo undotree().entries
ENDTEST
STARTTEST STARTTEST
:" Delete three characters and undo :" Delete three characters and undo
Gx:set ul=100 Gx:set ul=100

View File

@@ -714,6 +714,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 */
/**/
5,
/**/ /**/
4, 4,
/**/ /**/