indent(1): don't produce unnecessary blank lines.

Don't force a blank line between an opening brace and a block comment -- not
even if -bbb (blank lines before block comments) is on.
This commit is contained in:
Piotr Pawel Stefaniak 2017-07-23 14:33:04 +00:00
parent a3abcad0b7
commit f30beab3a1
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=321382
2 changed files with 4 additions and 1 deletions

View File

@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include "indent_globs.h"
#include "indent_codes.h"
#include "indent.h"
/*
* NAME:
@ -187,7 +188,7 @@ pr_comment(void)
char *t = e_com;
e_com = s_com + 2;
*e_com = 0;
if (blanklines_before_blockcomments)
if (blanklines_before_blockcomments && ps.last_token != lbrace)
prefix_blankline_requested = 1;
dump_line();
e_com = s_com = t;

View File

@ -0,0 +1,2 @@
/* $FreeBSD$ */
-bbb