From 145fc69df9f173717e3138c0a07a8de1a243519a Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Wed, 17 Nov 2021 07:07:15 +0800 Subject: vim-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 vim/vim#9103) https://github.com/vim/vim/commit/606efc7df4c94104bbd24248106dd0e4ee6f7cfa --- src/nvim/option.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/nvim/option.c b/src/nvim/option.c index ec5d4919ba..278cf7c608 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -2659,7 +2659,9 @@ ambw_end: clear_string_option(&curwin->w_p_lcs); } FOR_ALL_TAB_WINDOWS(tp, wp) { - set_chars_option(wp, &wp->w_p_lcs, true); + // 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, true); } redraw_all_later(NOT_VALID); } @@ -2674,7 +2676,9 @@ ambw_end: clear_string_option(&curwin->w_p_fcs); } FOR_ALL_TAB_WINDOWS(tp, wp) { - set_chars_option(wp, &wp->w_p_fcs, true); + // 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_fcs, true); } redraw_all_later(NOT_VALID); } -- cgit