]> git.wh0rd.org Git - nano.git/commitdiff
Renaming a label and eliding an 'else'.
authorBenno Schulenberg <bensberg@justemail.net>
Tue, 1 Dec 2015 12:49:17 +0000 (12:49 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Tue, 1 Dec 2015 12:49:17 +0000 (12:49 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5462 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/winio.c

index e8ff7e00409cfdeeeb3a70e22fa79f3e1e23283b..f72fb4feb78ddbd6e8abe473500a301a5467f3dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,7 @@
        * src/files.c (do_insertfile): Rename two variables for clarity.
        * 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): Rename a label and elide an 'else'.
 
 2015-11-30  Benno Schulenberg  <bensberg@justemail.net>
        * src/text.c (redo_cut, update_undo): When cutting reaches the EOF,
index 0aa567132fba93b8117beb7d957feff7036fbe36..50cab891918f75165c2135e59eec90757f0d57bd 100644 (file)
@@ -2560,19 +2560,19 @@ void edit_draw(filestruct *fileptr, const char *converted, int
 
                /* First see if the multidata was maybe already calculated. */
                if (fileptr->multidata[tmpcolor->id] == CNONE)
-                   goto end_of_loop;
+                   goto tail_of_loop;
                else if (fileptr->multidata[tmpcolor->id] == CWHOLELINE) {
                    mvwaddnstr(edit, line, 0, converted, -1);
-                   goto end_of_loop;
+                   goto tail_of_loop;
                } else if (fileptr->multidata[tmpcolor->id] == CBEGINBEFORE) {
                    regexec(tmpcolor->end, fileptr->data, 1, &endmatch, 0);
                    /* If the coloured part is scrolled off, skip it. */
                    if (endmatch.rm_eo <= startpos)
-                       goto end_of_loop;
+                       goto tail_of_loop;
                    paintlen = actual_x(converted, strnlenpt(fileptr->data,
                        endmatch.rm_eo) - start);
                    mvwaddnstr(edit, line, 0, converted, paintlen);
-                   goto end_of_loop;
+                   goto tail_of_loop;
                } if (fileptr->multidata[tmpcolor->id] == -1)
                    /* Assume this until proven otherwise below. */
                    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. */
                if (startmatch.rm_so == startmatch.rm_eo)
-                   startmatch.rm_eo++;
-               else {
+                   goto tail_of_loop;
+
+               {
                    /* Now start_line is the first line before fileptr
                     * containing a start match.  Is there a start on
                     * 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
                     * looking for any more starts. */
                    if (paintlen < 0)
-                       goto end_of_loop;
+                       goto tail_of_loop;
   step_two:
                    /* Second step: look for starts on this line, but start
                     * 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, COLOR_PAIR(tmpcolor->pairnum));
        }