aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-11-17 07:07:15 +0800
committerzeertzjq <zeertzjq@outlook.com>2021-11-17 07:11:46 +0800
commit145fc69df9f173717e3138c0a07a8de1a243519a (patch)
tree8716bb2b74b3d7996ceb166805a26d8b2cec4b08 /src
parent8dbe47a4bc823e05afed8048e548a5ff9cc1819f (diff)
downloadrneovim-145fc69df9f173717e3138c0a07a8de1a243519a.tar.gz
rneovim-145fc69df9f173717e3138c0a07a8de1a243519a.tar.bz2
rneovim-145fc69df9f173717e3138c0a07a8de1a243519a.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/nvim/option.c8
1 files changed, 6 insertions, 2 deletions
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);
}