return line;
/* Find:
- * - COM_START,
* - COM_END,
* - colon,
* whichever comes first.
*/
while (*comment_flags)
{
- if (*comment_flags == COM_START
- || *comment_flags == COM_END
+ if (*comment_flags == COM_END
|| *comment_flags == ':')
{
break;
}
/* 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.
+ * 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;
STARTTEST
/^{/+1
-:set comments=s1:/*,mb:*,ex:*/,://
+: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
* 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.
{
/* 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.
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 550,
/**/
549,
/**/