]>
Commit | Line | Data |
---|---|---|
8bb52fd3 ER |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.549 | |
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.549 | |
11 | Problem: In 'cinoptions' "0s" is interpreted as one shiftwidth. (David | |
12 | Pineau) | |
13 | Solution: Use the zero as zero. (Lech Lorens) | |
14 | Files: src/misc1.c, src/testdir/test3.in, src/testdir/test3.ok | |
15 | ||
16 | ||
17 | *** ../vim-7.3.548/src/misc1.c 2012-06-06 16:12:54.000000000 +0200 | |
18 | --- src/misc1.c 2012-06-13 13:17:11.000000000 +0200 | |
19 | *************** | |
20 | *** 6635,6640 **** | |
21 | --- 6635,6641 ---- | |
22 | int whilelevel; | |
23 | linenr_T lnum; | |
24 | char_u *options; | |
25 | + char_u *digits; | |
26 | int fraction = 0; /* init for GCC */ | |
27 | int divider; | |
28 | int n; | |
29 | *************** | |
30 | *** 6650,6655 **** | |
31 | --- 6651,6657 ---- | |
32 | l = options++; | |
33 | if (*options == '-') | |
34 | ++options; | |
35 | + digits = options; /* remember where the digits start */ | |
36 | n = getdigits(&options); | |
37 | divider = 0; | |
38 | if (*options == '.') /* ".5s" means a fraction */ | |
39 | *************** | |
40 | *** 6666,6672 **** | |
41 | } | |
42 | if (*options == 's') /* "2s" means two times 'shiftwidth' */ | |
43 | { | |
44 | ! if (n == 0 && fraction == 0) | |
45 | n = curbuf->b_p_sw; /* just "s" is one 'shiftwidth' */ | |
46 | else | |
47 | { | |
48 | --- 6668,6674 ---- | |
49 | } | |
50 | if (*options == 's') /* "2s" means two times 'shiftwidth' */ | |
51 | { | |
52 | ! if (options == digits) | |
53 | n = curbuf->b_p_sw; /* just "s" is one 'shiftwidth' */ | |
54 | else | |
55 | { | |
56 | *** ../vim-7.3.548/src/testdir/test3.in 2012-04-05 17:17:38.000000000 +0200 | |
57 | --- src/testdir/test3.in 2012-06-13 13:17:31.000000000 +0200 | |
58 | *************** | |
59 | *** 977,982 **** | |
60 | --- 977,1000 ---- | |
61 | ||
62 | STARTTEST | |
63 | :set cin | |
64 | + :set cino=es,n0s | |
65 | + /main | |
66 | + =][ | |
67 | + ENDTEST | |
68 | + | |
69 | + main(void) | |
70 | + { | |
71 | + /* Make sure that cino=X0s is not parsed like cino=Xs. */ | |
72 | + if (cond) | |
73 | + foo(); | |
74 | + else | |
75 | + { | |
76 | + bar(); | |
77 | + } | |
78 | + } | |
79 | + | |
80 | + STARTTEST | |
81 | + :set cin | |
82 | :set cino= | |
83 | ]]=][ | |
84 | ENDTEST | |
85 | *** ../vim-7.3.548/src/testdir/test3.ok 2012-04-05 17:17:38.000000000 +0200 | |
86 | --- src/testdir/test3.ok 2012-06-13 13:17:31.000000000 +0200 | |
87 | *************** | |
88 | *** 940,945 **** | |
89 | --- 940,957 ---- | |
90 | } | |
91 | ||
92 | ||
93 | + main(void) | |
94 | + { | |
95 | + /* Make sure that cino=X0s is not parsed like cino=Xs. */ | |
96 | + if (cond) | |
97 | + foo(); | |
98 | + else | |
99 | + { | |
100 | + bar(); | |
101 | + } | |
102 | + } | |
103 | + | |
104 | + | |
105 | { | |
106 | do | |
107 | { | |
108 | *** ../vim-7.3.548/src/version.c 2012-06-07 21:09:35.000000000 +0200 | |
109 | --- src/version.c 2012-06-13 13:37:18.000000000 +0200 | |
110 | *************** | |
111 | *** 716,717 **** | |
112 | --- 716,719 ---- | |
113 | { /* Add new patch number below this line */ | |
114 | + /**/ | |
115 | + 549, | |
116 | /**/ | |
117 | ||
118 | -- | |
119 | hundred-and-one symptoms of being an internet addict: | |
120 | 29. Your phone bill comes to your doorstep in a box. | |
121 | ||
122 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
123 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
124 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
125 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |