updated for version 7.3.550
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)
diff --git a/src/ops.c b/src/ops.c
index 37c6aab..5383a7c 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -4250,15 +4250,13 @@
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;
@@ -4267,9 +4265,8 @@
}
/* 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;
diff --git a/src/testdir/test29.in b/src/testdir/test29.in
index cf24642..2df2f70 100644
--- a/src/testdir/test29.in
+++ b/src/testdir/test29.in
Binary files differ
diff --git a/src/testdir/test29.ok b/src/testdir/test29.ok
index a5546ab..902d52f 100644
--- a/src/testdir/test29.ok
+++ b/src/testdir/test29.ok
@@ -66,6 +66,8 @@
{
/* 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.
diff --git a/src/version.c b/src/version.c
index 1e5d5cd..e3abb95 100644
--- a/src/version.c
+++ b/src/version.c
@@ -715,6 +715,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 550,
+/**/
549,
/**/
548,