Author: pfg
Date: Sun Jul 31 20:13:00 2016
New Revision: 303597
URL: https://svnweb.freebsd.org/changeset/base/303597

Log:
  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

Modified:
  head/usr.bin/indent/pr_comment.c

Modified: head/usr.bin/indent/pr_comment.c
==============================================================================
--- head/usr.bin/indent/pr_comment.c    Sun Jul 31 20:04:18 2016        
(r303596)
+++ head/usr.bin/indent/pr_comment.c    Sun Jul 31 20:13:00 2016        
(r303597)
@@ -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) {
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to