tweaks: adjust whitespace after the previous change

master
Benno Schulenberg 2017-01-09 11:49:35 +01:00
parent 38d7362f20
commit f6fbc1572d
1 changed files with 180 additions and 189 deletions

View File

@ -2398,7 +2398,6 @@ void edit_draw(filestruct *fileptr, const char *converted, int
startmatch.rm_eo <= from_x) startmatch.rm_eo <= from_x)
continue; continue;
{
start_col = (startmatch.rm_so <= from_x) ? start_col = (startmatch.rm_so <= from_x) ?
0 : strnlenpt(fileptr->data, 0 : strnlenpt(fileptr->data,
startmatch.rm_so) - from_col; startmatch.rm_so) - from_col;
@ -2411,12 +2410,10 @@ void edit_draw(filestruct *fileptr, const char *converted, int
mvwaddnstr(edit, line, margin + start_col, mvwaddnstr(edit, line, margin + start_col,
thetext, paintlen); thetext, paintlen);
} }
}
goto tail_of_loop; goto tail_of_loop;
} }
/* Second case: varnish is a multiline expression. */ /* Second case: varnish is a multiline expression. */
{
const filestruct *start_line = fileptr->prev; const filestruct *start_line = fileptr->prev;
/* The first line before fileptr that matches 'start'. */ /* The first line before fileptr that matches 'start'. */
const filestruct *end_line = fileptr; const filestruct *end_line = fileptr;
@ -2503,8 +2500,8 @@ void edit_draw(filestruct *fileptr, const char *converted, int
/* We've already checked that there is no end before fileptr /* We've already checked that there is no end before fileptr
* and after the start. But is there an end after the start * and after the start. But is there an end after the start
* at all? We don't paint unterminated starts. */ * at all? We don't paint unterminated starts. */
while (end_line != NULL && regexec(varnish->end, while (end_line != NULL && regexec(varnish->end, end_line->data,
end_line->data, 1, &endmatch, 0) == REG_NOMATCH) 1, &endmatch, 0) == REG_NOMATCH)
end_line = end_line->next; end_line = end_line->next;
/* If no end was found, or it is too early, next step. */ /* If no end was found, or it is too early, next step. */
@ -2553,9 +2550,8 @@ void edit_draw(filestruct *fileptr, const char *converted, int
thetext = converted + actual_x(converted, start_col); thetext = converted + actual_x(converted, start_col);
if (regexec(varnish->end, fileptr->data + if (regexec(varnish->end, fileptr->data + startmatch.rm_eo,
startmatch.rm_eo, 1, &endmatch, 1, &endmatch, (startmatch.rm_eo == 0) ?
(startmatch.rm_eo == 0) ?
0 : REG_NOTBOL) == 0) { 0 : REG_NOTBOL) == 0) {
/* Translate the end match to be relative to /* Translate the end match to be relative to
* the beginning of the line. */ * the beginning of the line. */
@ -2584,17 +2580,14 @@ void edit_draw(filestruct *fileptr, const char *converted, int
continue; continue;
} }
{ /* There is no end on this line. But maybe on later lines? */
/* There is no end on this line. But we haven't yet
* looked for one on later lines. */
end_line = fileptr->next; end_line = fileptr->next;
while (end_line != NULL && while (end_line != NULL && regexec(varnish->end, end_line->data,
regexec(varnish->end, end_line->data,
0, NULL, 0) == REG_NOMATCH) 0, NULL, 0) == REG_NOMATCH)
end_line = end_line->next; end_line = end_line->next;
/* If there is no end, we're done on this line. */ /* If there is no end, we're done with this regex. */
if (end_line == NULL) if (end_line == NULL)
break; break;
@ -2608,8 +2601,6 @@ void edit_draw(filestruct *fileptr, const char *converted, int
* bother checking for any more starts. */ * bother checking for any more starts. */
break; break;
} }
}
}
tail_of_loop: tail_of_loop:
wattroff(edit, varnish->attributes); wattroff(edit, varnish->attributes);
} }