diff options
author | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-07-31 20:13:00 +0000 |
---|---|---|
committer | Pedro F. Giffuni <pfg@FreeBSD.org> | 2016-07-31 20:13:00 +0000 |
commit | 8ad92a65e4ee7703a9ced52a4bc38748b7c7df82 (patch) | |
tree | 07f1d7c20e2df99e6af902bfb2bd7de2c3e1ba28 /usr.bin/indent | |
parent | 54d57555a3e498e62133d69ba4777f7d1349d9a9 (diff) | |
download | src-8ad92a65e4ee7703a9ced52a4bc38748b7c7df82.tar.gz src-8ad92a65e4ee7703a9ced52a4bc38748b7c7df82.zip |
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:
https://github.com/pstef/freebsd_indent/commit/345663c07af0758fd10433bde14722dfd900f85c
Differential Revision: https://reviews.freebsd.org/D6966 (Partial)
Submitted by: Piotr Stefaniak
Notes
Notes:
svn path=/head/; revision=303597
Diffstat (limited to 'usr.bin/indent')
-rw-r--r-- | usr.bin/indent/pr_comment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr.bin/indent/pr_comment.c b/usr.bin/indent/pr_comment.c index 5c44d3d1cfe1..f4fc50c14cd3 100644 --- a/usr.bin/indent/pr_comment.c +++ b/usr.bin/indent/pr_comment.c @@ -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) { |