switch (state) {
case read_token:
- if (fold_on_chars && strchr (fold_on_chars, *p) != NULL) {
- fold_type = fold_after;
- state = fold_token;
- next_state = read_token;
+ if (fold_on_chars) {
+ if (strchr (fold_on_chars, *p) != NULL) {
+ fold_type = fold_after;
+ state = fold_token;
+ next_state = read_token;
+ }
p ++;
}
/* Last token */
switch (state) {
case read_token:
- if (cur_len > fold_max && !first_token) {
+ if (!fold_on_chars && cur_len > fold_max && !first_token) {
if (g_ascii_isspace (*c)) {
c ++;
}