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

This commit is contained in:
Piotr Pawel Stefaniak 2018-06-01 09:32:42 +00:00
parent e8a5d07df5
commit 5f35ea69af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=334477
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.block_init_level <= 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;
}
break;

View File

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

View File

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