• R/O
  • SSH

vim: Commit

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


Commit MetaInfo

Revision9d74e2f433c0370cb458c83d12b05f72226df489 (tree)
Time2008-08-08 19:36:31
Authorvimboss
Commitervimboss

Log Message

updated for version 7.2c-001

Change Summary

Incremental Difference

diff -r f4f8014d516e -r 9d74e2f433c0 runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Wed Aug 06 17:06:04 2008 +0000
+++ b/runtime/doc/eval.txt Fri Aug 08 10:36:31 2008 +0000
@@ -2681,7 +2681,11 @@
26812681 Examples: >
26822682 :echo sort(extend(mylist, [7, 5]))
26832683 :call extend(mylist, [2, 3], 1)
2684-< Use |add()| to concatenate one item to a list. To concatenate
2684+< When {expr1} is the same List as {expr2} then the number of
2685+ items copied is equal to the original length of the List.
2686+ E.g., when {expr3} is 1 you get N new copies of the first item
2687+ (where N is the original length of the List).
2688+ Use |add()| to concatenate one item to a list. To concatenate
26852689 two lists into a new list use the + operator: >
26862690 :let newlist = [1, 2, 3] + [4, 5]
26872691 <
diff -r f4f8014d516e -r 9d74e2f433c0 src/eval.c
--- a/src/eval.c Wed Aug 06 17:06:04 2008 +0000
+++ b/src/eval.c Fri Aug 08 10:36:31 2008 +0000
@@ -6231,8 +6231,11 @@
62316231 listitem_T *bef;
62326232 {
62336233 listitem_T *item;
6234-
6235- for (item = l2->lv_first; item != NULL; item = item->li_next)
6234+ int todo = l2->lv_len;
6235+
6236+ /* We also quit the loop when we have inserted the original item count of
6237+ * the list, avoid a hang when we extend a list with itself. */
6238+ for (item = l2->lv_first; item != NULL && --todo >= 0; item = item->li_next)
62366239 if (list_insert_tv(l1, &item->li_tv, bef) == FAIL)
62376240 return FAIL;
62386241 return OK;
diff -r f4f8014d516e -r 9d74e2f433c0 src/version.c
--- a/src/version.c Wed Aug 06 17:06:04 2008 +0000
+++ b/src/version.c Fri Aug 08 10:36:31 2008 +0000
@@ -677,6 +677,8 @@
677677 static int included_patches[] =
678678 { /* Add new patch number below this line */
679679 /**/
680+ 1,
681+/**/
680682 0
681683 };
682684
Show on old repository browser