]>
Commit | Line | Data |
---|---|---|
4ee1e577 ER |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.162 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.162 | |
11 | Problem: No error message when assigning to a list with an index out of | |
12 | range. (Yukihiro Nakadaira) | |
13 | Solution: Add the error message. | |
14 | Files: src/eval.c | |
15 | ||
16 | ||
17 | *** ../vim-7.3.161/src/eval.c 2011-04-11 21:35:03.000000000 +0200 | |
18 | --- src/eval.c 2011-04-21 13:40:38.000000000 +0200 | |
19 | *************** | |
20 | *** 2794,2799 **** | |
21 | --- 2794,2801 ---- | |
22 | { | |
23 | if (lp->ll_range && !lp->ll_empty2) | |
24 | clear_tv(&var2); | |
25 | + if (!quiet) | |
26 | + EMSGN(_(e_listidx), lp->ll_n1); | |
27 | return NULL; | |
28 | } | |
29 | ||
30 | *************** | |
31 | *** 2811,2817 **** | |
32 | --- 2813,2823 ---- | |
33 | { | |
34 | ni = list_find(lp->ll_list, lp->ll_n2); | |
35 | if (ni == NULL) | |
36 | + { | |
37 | + if (!quiet) | |
38 | + EMSGN(_(e_listidx), lp->ll_n2); | |
39 | return NULL; | |
40 | + } | |
41 | lp->ll_n2 = list_idx_of_item(lp->ll_list, ni); | |
42 | } | |
43 | ||
44 | *************** | |
45 | *** 2819,2825 **** | |
46 | --- 2825,2835 ---- | |
47 | if (lp->ll_n1 < 0) | |
48 | lp->ll_n1 = list_idx_of_item(lp->ll_list, lp->ll_li); | |
49 | if (lp->ll_n2 < lp->ll_n1) | |
50 | + { | |
51 | + if (!quiet) | |
52 | + EMSGN(_(e_listidx), lp->ll_n2); | |
53 | return NULL; | |
54 | + } | |
55 | } | |
56 | ||
57 | lp->ll_tv = &lp->ll_li->li_tv; | |
58 | *** ../vim-7.3.161/src/version.c 2011-04-11 21:35:03.000000000 +0200 | |
59 | --- src/version.c 2011-04-21 13:44:46.000000000 +0200 | |
60 | *************** | |
61 | *** 716,717 **** | |
62 | --- 716,719 ---- | |
63 | { /* Add new patch number below this line */ | |
64 | + /**/ | |
65 | + 162, | |
66 | /**/ | |
67 | ||
68 | -- | |
69 | Far back in the mists of ancient time, in the great and glorious days of the | |
70 | former Galactic Empire, life was wild, rich and largely tax free. | |
71 | Mighty starships plied their way between exotic suns, seeking adventure and | |
72 | reward among the furthest reaches of Galactic space. In those days, spirits | |
73 | were brave, the stakes were high, men were real men, women were real women | |
74 | and small furry creatures from Alpha Centauri were real small furry creatures | |
75 | from Alpha Centauri. And all dared to brave unknown terrors, to do mighty | |
76 | deeds, to boldly split infinitives that no man had split before -- and thus | |
77 | was the Empire forged. | |
78 | -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy" | |
79 | ||
80 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
81 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
82 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
83 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |