indent(1): Don't unnecessarily add a blank before a comment ends.
pr_comment() did avoid adding surplus space character when a comment contained it at the end. Now it's also paying attention to tabs. Taken from: Piotr Stefaniak
This commit is contained in:
parent
67b7daecf7
commit
909f007fb8
@ -293,7 +293,7 @@ pr_comment(void)
|
|||||||
s_com = e_com;
|
s_com = e_com;
|
||||||
*e_com++ = ' ';
|
*e_com++ = ' ';
|
||||||
}
|
}
|
||||||
if (e_com[-1] != ' ' && !ps.box_com)
|
if (e_com[-1] != ' ' && e_com[-1] != '\t' && !ps.box_com)
|
||||||
*e_com++ = ' '; /* ensure blank before end */
|
*e_com++ = ' '; /* ensure blank before end */
|
||||||
*e_com++ = '*', *e_com++ = '/', *e_com = '\0';
|
*e_com++ = '*', *e_com++ = '/', *e_com = '\0';
|
||||||
ps.just_saw_decl = l_just_saw_decl;
|
ps.just_saw_decl = l_just_saw_decl;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user