indent(1): consider tab characters when forcing a newline after a comma

This commit is contained in:
pstef 2018-06-01 09:32:42 +00:00
parent 656cf3ca1b
commit f4a197dd60
3 changed files with 6 additions and 1 deletions

View File

@ -1058,7 +1058,9 @@ main(int argc, char **argv)
if (ps.p_l_follow == 0) { if (ps.p_l_follow == 0) {
if (ps.block_init_level <= 0) if (ps.block_init_level <= 0)
ps.block_init = 0; ps.block_init = 0;
if (break_comma && (!ps.leave_comma || compute_code_target() + (e_code - s_code) > max_col - tabsize)) if (break_comma && (!ps.leave_comma ||
count_spaces_until(compute_code_target(), s_code, e_code) >
max_col - tabsize))
force_nl = true; force_nl = true;
} }
break; break;

View File

@ -44,6 +44,7 @@ void t2 (char *x, int y)
,n ,n
,o ,o
; ;
int chars[ /* push the comma beyond column 74 .... */ ], x;
} }
const int int_minimum_size = const int int_minimum_size =

View File

@ -36,6 +36,8 @@ t2(char *x, int y)
,n ,n
,o ,o
; ;
int chars[ /* push the comma beyond column 74 .... */ ],
x;
} }
const int int_minimum_size = const int int_minimum_size =