Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Jul 2016 20:13:00 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r303597 - head/usr.bin/indent
Message-ID:  <201607312013.u6VKD0qb028457@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607312013.u6VKD0qb028457>