int paintlen;
/* Number of chars to paint on this line. There are COLS
* characters on a whole line. */
- size_t index = 0;
+ size_t index;
/* Index in converted where we paint. */
regmatch_t startmatch; /* match position for start_regexp */
regmatch_t endmatch; /* match position for end_regexp */
end_line = end_line->next;
/* No end found, or it is too early. */
- if (end_line == NULL ||
- (end_line == fileptr && endmatch.rm_eo <= startpos))
+ if (end_line == NULL || (end_line == fileptr &&
+ endmatch.rm_eo <= startpos))
goto step_two;
/* Now paint the start of fileptr. */
else
x_start = strnlenpt(fileptr->data,
startmatch.rm_so) - start;
+ index = actual_x(converted, x_start);
if (regexec(tmpcolor->end,
fileptr->data + startmatch.rm_eo, 1, &endmatch,
startmatch.rm_eo == 0 ? 0 : REG_NOTBOL) == 0) {
int paintlen;
/* Number of chars to paint on this line. There are COLS
* characters on a whole line. */
- size_t index = 0;
+ size_t index;
/* Index in converted where we paint. */
mark_order(&top, &top_x, &bot, &bot_x, NULL);