]> granicus.if.org Git - vim/commitdiff
patch 8.2.3588: break statement is never reached v8.2.3588
authorBram Moolenaar <Bram@vim.org>
Fri, 12 Nov 2021 19:52:47 +0000 (19:52 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 12 Nov 2021 19:52:47 +0000 (19:52 +0000)
Problem:    Break statement is never reached.
Solution:   Rely on return value of set_chars_option() not changing.
            (closes #9103)

src/optionstr.c
src/version.c

index 3afb3dbcf75922abe5aae6df4b99258b564765a0..2c4b2b826d166e0b40174015356bc863090eca63 100644 (file)
@@ -1331,11 +1331,10 @@ ambw_end:
            if (!(opt_flags & OPT_GLOBAL))
                clear_string_option(&curwin->w_p_lcs);
            FOR_ALL_TAB_WINDOWS(tp, wp)
-           {
-               errmsg = set_chars_option(wp, &wp->w_p_lcs);
-               if (errmsg)
-                   break;
-           }
+               // If no error was returned above, we don't expect an error
+               // here, so ignore the return value.
+               (void)set_chars_option(wp, &wp->w_p_lcs);
+
            redraw_all_later(NOT_VALID);
        }
     }
index 65d9d10f666ab3b5bdf74a7387c9895a1bdaeb9e..4be3fd2f5d06548495e095d9a46577fce7c5cdf5 100644 (file)
@@ -757,6 +757,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    3588,
 /**/
     3587,
 /**/