Renaming a label and eliding an 'else'.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5462 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
3d6378b153
commit
eee07d5755
|
@ -4,6 +4,7 @@
|
||||||
* src/files.c (do_insertfile): Rename two variables for clarity.
|
* src/files.c (do_insertfile): Rename two variables for clarity.
|
||||||
* src/text.c (redo_cut): Delete two redundant assignments.
|
* src/text.c (redo_cut): Delete two redundant assignments.
|
||||||
* src/winio.c (edit_draw): Move a check to a better place.
|
* src/winio.c (edit_draw): Move a check to a better place.
|
||||||
|
* src/winio.c (edit_draw): Rename a label and elide an 'else'.
|
||||||
|
|
||||||
2015-11-30 Benno Schulenberg <bensberg@justemail.net>
|
2015-11-30 Benno Schulenberg <bensberg@justemail.net>
|
||||||
* src/text.c (redo_cut, update_undo): When cutting reaches the EOF,
|
* src/text.c (redo_cut, update_undo): When cutting reaches the EOF,
|
||||||
|
|
17
src/winio.c
17
src/winio.c
|
@ -2560,19 +2560,19 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
|
|
||||||
/* First see if the multidata was maybe already calculated. */
|
/* First see if the multidata was maybe already calculated. */
|
||||||
if (fileptr->multidata[tmpcolor->id] == CNONE)
|
if (fileptr->multidata[tmpcolor->id] == CNONE)
|
||||||
goto end_of_loop;
|
goto tail_of_loop;
|
||||||
else if (fileptr->multidata[tmpcolor->id] == CWHOLELINE) {
|
else if (fileptr->multidata[tmpcolor->id] == CWHOLELINE) {
|
||||||
mvwaddnstr(edit, line, 0, converted, -1);
|
mvwaddnstr(edit, line, 0, converted, -1);
|
||||||
goto end_of_loop;
|
goto tail_of_loop;
|
||||||
} else if (fileptr->multidata[tmpcolor->id] == CBEGINBEFORE) {
|
} else if (fileptr->multidata[tmpcolor->id] == CBEGINBEFORE) {
|
||||||
regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0);
|
regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0);
|
||||||
/* If the coloured part is scrolled off, skip it. */
|
/* If the coloured part is scrolled off, skip it. */
|
||||||
if (endmatch.rm_eo <= startpos)
|
if (endmatch.rm_eo <= startpos)
|
||||||
goto end_of_loop;
|
goto tail_of_loop;
|
||||||
paintlen = actual_x(converted, strnlenpt(fileptr->data,
|
paintlen = actual_x(converted, strnlenpt(fileptr->data,
|
||||||
endmatch.rm_eo) - start);
|
endmatch.rm_eo) - start);
|
||||||
mvwaddnstr(edit, line, 0, converted, paintlen);
|
mvwaddnstr(edit, line, 0, converted, paintlen);
|
||||||
goto end_of_loop;
|
goto tail_of_loop;
|
||||||
} if (fileptr->multidata[tmpcolor->id] == -1)
|
} if (fileptr->multidata[tmpcolor->id] == -1)
|
||||||
/* Assume this until proven otherwise below. */
|
/* Assume this until proven otherwise below. */
|
||||||
fileptr->multidata[tmpcolor->id] = CNONE;
|
fileptr->multidata[tmpcolor->id] = CNONE;
|
||||||
|
@ -2609,8 +2609,9 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
|
|
||||||
/* Skip over a zero-length regex match. */
|
/* Skip over a zero-length regex match. */
|
||||||
if (startmatch.rm_so == startmatch.rm_eo)
|
if (startmatch.rm_so == startmatch.rm_eo)
|
||||||
startmatch.rm_eo++;
|
goto tail_of_loop;
|
||||||
else {
|
|
||||||
|
{
|
||||||
/* Now start_line is the first line before fileptr
|
/* Now start_line is the first line before fileptr
|
||||||
* containing a start match. Is there a start on
|
* containing a start match. Is there a start on
|
||||||
* this line not followed by an end on this line? */
|
* this line not followed by an end on this line? */
|
||||||
|
@ -2677,7 +2678,7 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
/* If the whole line has been painted, don't bother
|
/* If the whole line has been painted, don't bother
|
||||||
* looking for any more starts. */
|
* looking for any more starts. */
|
||||||
if (paintlen < 0)
|
if (paintlen < 0)
|
||||||
goto end_of_loop;
|
goto tail_of_loop;
|
||||||
step_two:
|
step_two:
|
||||||
/* Second step: look for starts on this line, but start
|
/* Second step: look for starts on this line, but start
|
||||||
* looking only after an end match, if there is one. */
|
* looking only after an end match, if there is one. */
|
||||||
|
@ -2760,7 +2761,7 @@ void edit_draw(filestruct *fileptr, const char *converted, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end_of_loop:
|
tail_of_loop:
|
||||||
wattroff(edit, A_BOLD);
|
wattroff(edit, A_BOLD);
|
||||||
wattroff(edit, COLOR_PAIR(tmpcolor->pairnum));
|
wattroff(edit, COLOR_PAIR(tmpcolor->pairnum));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue