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:
parent
a3abcad0b7
commit
f30beab3a1
@ -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;
|
||||
|
2
usr.bin/indent/tests/comments.pro
Normal file
2
usr.bin/indent/tests/comments.pro
Normal file
@ -0,0 +1,2 @@
|
||||
/* $FreeBSD$ */
|
||||
-bbb
|
Loading…
Reference in New Issue
Block a user