indent(1): Don't ignore newlines after comments that follow braces.
indent.c has a special loop that stores tokens from between an if () and the next statement into a buffer. The loop ignored all newlines, but that resulted in not calling dump_line() when it was needed to produce the final line of the buffered up comment. Taken from: Piotr Stefaniak
This commit is contained in:
parent
458051a57b
commit
67b7daecf7
@ -335,8 +335,10 @@ main(int argc, char **argv)
|
||||
switch (type_code) {
|
||||
case newline:
|
||||
++line_no;
|
||||
if (sc_end != NULL)
|
||||
goto sw_buffer; /* dump comment, if any */
|
||||
if (sc_end != NULL) { /* dump comment, if any */
|
||||
*sc_end++ = '\n'; /* newlines are needed in this case */
|
||||
goto sw_buffer;
|
||||
}
|
||||
flushed_nl = true;
|
||||
case form_feed:
|
||||
break; /* form feeds and newlines found here will be
|
||||
|
Loading…
x
Reference in New Issue
Block a user