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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
To: vim_dev@googlegroups.com
Subject: Patch 7.3.550
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.550 (after 7.3.541)
Problem: With "j" in 'formatoptions' a list leader is not removed. (Gary
Johnson)
Solution: Don't ignore the start of a three part comment. (Lech Lorens)
Files: src/ops.c, src/testdir/test29.in, src/testdir/test29.ok
*** ../vim-7.3.549/src/ops.c 2012-06-07 21:09:35.000000000 +0200
--- src/ops.c 2012-06-13 13:48:26.000000000 +0200
***************
*** 4250,4264 ****
return line;
/* Find:
- * - COM_START,
* - COM_END,
* - colon,
* whichever comes first.
*/
while (*comment_flags)
{
! if (*comment_flags == COM_START
! || *comment_flags == COM_END
|| *comment_flags == ':')
{
break;
--- 4250,4262 ----
return line;
/* Find:
* - COM_END,
* - colon,
* whichever comes first.
*/
while (*comment_flags)
{
! if (*comment_flags == COM_END
|| *comment_flags == ':')
{
break;
***************
*** 4267,4275 ****
}
/* If we found a colon, it means that we are not processing a line
! * starting with an opening or a closing part of a three-part
! * comment. That's good, because we don't want to remove those as
! * this would be annoying.
*/
if (*comment_flags == ':' || *comment_flags == NUL)
line += lead_len;
--- 4265,4272 ----
}
/* If we found a colon, it means that we are not processing a line
! * starting with a closing part of a three-part comment. That's good,
! * because we don't want to remove those as this would be annoying.
*/
if (*comment_flags == ':' || *comment_flags == NUL)
line += lead_len;
*** ../vim-7.3.549/src/testdir/test29.in 2012-06-06 16:12:54.000000000 +0200
--- src/testdir/test29.in 2012-06-13 13:48:26.000000000 +0200
***************
*** 103,114 ****
STARTTEST
/^{/+1
! :set comments=s1:/*,mb:*,ex:*/,://
:set comments+=s1:>#,mb:#,ex:#<,:<
:set cpoptions-=j joinspaces fo=j
:set backspace=eol,start
:.,+3join
j4J
:.,+2join
j3J
:.,+2join
--- 103,117 ----
STARTTEST
/^{/+1
! :set comments=sO:*\ -,mO:*\ \ ,exO:*/
! :set comments+=s1:/*,mb:*,ex:*/,://
:set comments+=s1:>#,mb:#,ex:#<,:<
:set cpoptions-=j joinspaces fo=j
:set backspace=eol,start
:.,+3join
j4J
+ :.,+8join
+ j9J
:.,+2join
j3J
:.,+2join
***************
*** 132,137 ****
--- 135,158 ----
* Make sure the previous comment leader is not removed.
*/
+ /* List:
+ * - item1
+ * foo bar baz
+ * foo bar baz
+ * - item2
+ * foo bar baz
+ * foo bar baz
+ */
+
+ /* List:
+ * - item1
+ * foo bar baz
+ * foo bar baz
+ * - item2
+ * foo bar baz
+ * foo bar baz
+ */
+
// Should the next comment leader be left alone?
// Yes.
*** ../vim-7.3.549/src/testdir/test29.ok 2012-06-06 16:12:54.000000000 +0200
--- src/testdir/test29.ok 2012-06-13 13:48:26.000000000 +0200
***************
*** 66,71 ****
--- 66,73 ----
{
/* Make sure the previous comment leader is not removed. */
/* Make sure the previous comment leader is not removed. */
+ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
+ /* List: item1 foo bar baz foo bar baz item2 foo bar baz foo bar baz */
// Should the next comment leader be left alone? Yes.
// Should the next comment leader be left alone? Yes.
/* Here the comment leader should be left intact. */ // And so should this one.
*** ../vim-7.3.549/src/version.c 2012-06-13 13:40:45.000000000 +0200
--- src/version.c 2012-06-13 13:50:23.000000000 +0200
***************
*** 716,717 ****
--- 716,719 ----
{ /* Add new patch number below this line */
+ /**/
+ 550,
/**/
--
If you put 7 of the most talented OSS developers in a room for a week
and asked them to fix a bug in a spreadsheet program, in 1 week
you'd have 2 new mail readers and a text-based web browser.
/// 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 ///
|