From owner-svn-src-all@freebsd.org Sun Jul 31 20:13:01 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9DAFBA9DBB; Sun, 31 Jul 2016 20:13:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA27C1FA3; Sun, 31 Jul 2016 20:13:01 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u6VKD0CO028458; Sun, 31 Jul 2016 20:13:00 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u6VKD0qb028457; Sun, 31 Jul 2016 20:13:00 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201607312013.u6VKD0qb028457@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 31 Jul 2016 20:13:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r303597 - head/usr.bin/indent X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2016 20:13:02 -0000 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) {