summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.3.162
blob: 3f0173afb83972a068c7d24557a647e76ec39fbd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
To: vim_dev@googlegroups.com
Subject: Patch 7.3.162
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.162
Problem:    No error message when assigning to a list with an index out of
	    range. (Yukihiro Nakadaira)
Solution:   Add the error message.
Files:	    src/eval.c


*** ../vim-7.3.161/src/eval.c	2011-04-11 21:35:03.000000000 +0200
--- src/eval.c	2011-04-21 13:40:38.000000000 +0200
***************
*** 2794,2799 ****
--- 2794,2801 ----
  	    {
  		if (lp->ll_range && !lp->ll_empty2)
  		    clear_tv(&var2);
+ 		if (!quiet)
+ 		    EMSGN(_(e_listidx), lp->ll_n1);
  		return NULL;
  	    }
  
***************
*** 2811,2817 ****
--- 2813,2823 ----
  		{
  		    ni = list_find(lp->ll_list, lp->ll_n2);
  		    if (ni == NULL)
+ 		    {
+ 			if (!quiet)
+ 			    EMSGN(_(e_listidx), lp->ll_n2);
  			return NULL;
+ 		    }
  		    lp->ll_n2 = list_idx_of_item(lp->ll_list, ni);
  		}
  
***************
*** 2819,2825 ****
--- 2825,2835 ----
  		if (lp->ll_n1 < 0)
  		    lp->ll_n1 = list_idx_of_item(lp->ll_list, lp->ll_li);
  		if (lp->ll_n2 < lp->ll_n1)
+ 		{
+ 		    if (!quiet)
+ 			EMSGN(_(e_listidx), lp->ll_n2);
  		    return NULL;
+ 		}
  	    }
  
  	    lp->ll_tv = &lp->ll_li->li_tv;
*** ../vim-7.3.161/src/version.c	2011-04-11 21:35:03.000000000 +0200
--- src/version.c	2011-04-21 13:44:46.000000000 +0200
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     162,
  /**/

-- 
Far back in the mists of ancient time, in the great and glorious days of the
former Galactic Empire, life was wild, rich and largely tax free.
Mighty starships plied their way between exotic suns, seeking adventure and
reward among the furthest reaches of Galactic space.  In those days, spirits
were brave, the stakes were high, men were real men, women were real women
and small furry creatures from Alpha Centauri were real small furry creatures
from Alpha Centauri.  And all dared to brave unknown terrors, to do mighty
deeds, to boldly split infinitives that no man had split before -- and thus
was the Empire forged.
		-- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///