1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

indent(1): Fix wrapping of some lines in comments.

After a blank line was printed (to separate paragraphs in comments), the
next line was sometimes wrapped to the column at which the previous
non-empty line ended. The fix is to reset the last blank pointer (last_bl)
on newline.

References:
345663c07a

Differential Revision: https://reviews.freebsd.org/D6966  (Partial)
Submitted by:	Piotr Stefaniak
This commit is contained in:
Pedro F. Giffuni 2016-07-31 20:13:00 +00:00
parent 54d57555a3
commit 8ad92a65e4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=303597

View File

@ -218,6 +218,7 @@ pr_comment(void)
dump_line();
return;
}
last_bl = NULL;
if (ps.box_com || ps.last_nl) { /* if this is a boxed comment,
* we dont ignore the newline */
if (s_com == e_com) {