• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Révisionf607f15ab091b6a51b0546db6a6d42adfa599c3d (tree)
l'heure2005-09-08 06:22:27
Auteurvimboss
Commitervimboss

Message de Log

updated for version 7.0143

Change Summary

Modification

diff -r 32cf0d2e14b4 -r f607f15ab091 src/eval.c
--- a/src/eval.c Wed Sep 07 21:21:14 2005 +0000
+++ b/src/eval.c Wed Sep 07 21:22:27 2005 +0000
@@ -2831,6 +2831,8 @@
28312831 }
28322832 else
28332833 {
2834+ /* No need to increment the refcount, it's already set for the
2835+ * list being used in "tv". */
28342836 fi->fi_list = l;
28352837 list_add_watch(l, &fi->fi_lw);
28362838 fi->fi_lw.lw_item = l->lv_first;
@@ -5861,14 +5863,16 @@
58615863
58625864 /*
58635865 * 3. Go through the list of lists and free items without the copyID.
5866+ * But don't free a list that has a watcher (used in a for loop), these
5867+ * are not referenced anywhere.
58645868 */
58655869 for (ll = first_list; ll != NULL; )
5866- if (ll->lv_copyID != copyID)
5870+ if (ll->lv_copyID != copyID && ll->lv_watch == NULL)
58675871 {
58685872 list_free(ll);
58695873 did_free = TRUE;
58705874
5871- /* restart, next dict may also have been freed */
5875+ /* restart, next list may also have been freed */
58725876 ll = first_list;
58735877 }
58745878 else
Afficher sur ancien navigateur de dépôt.