Mercurial > vim
changeset 26111:1d326bc99a09 v8.2.3588
patch 8.2.3588: break statement is never reached
Commit: https://github.com/vim/vim/commit/606efc7df4c94104bbd24248106dd0e4ee6f7cfa
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Nov 12 19:52:47 2021 +0000
patch 8.2.3588: break statement is never reached
Problem: Break statement is never reached.
Solution: Rely on return value of set_chars_option() not changing.
(closes #9103)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 12 Nov 2021 21:00:06 +0100 |
parents | a41dc6b40896 |
children | 46874de42a18 |
files | src/optionstr.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/optionstr.c +++ b/src/optionstr.c @@ -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); } }