Problem: Coverity complains about ignoring return value of win_split()
(after v9.1.150)
Solution: Check if win_split() failed, add winfixbuf.res to Makefile
}
if (win_valid(prevwin) && !prevwin->w_p_wfb)
- {
// 'winfixbuf' is set; attempt to change to a window without it.
win_goto(prevwin);
- }
if (curwin->w_p_wfb)
{
// Split the window, which will be 'nowinfixbuf', and set curwin to
// that
- win_split(0, 0);
+ if (win_split(0, 0) == FAIL)
+ return; // error message already given
if (curwin->w_p_wfb)
{
test_window_cmd.res \
test_window_id.res \
test_windows_home.res \
+ test_winfixbuf.res \
test_wordcount.res \
test_writefile.res \
test_xxd.res \
augroup! QfChanged
endfunc
+func Test_bufdo_splitwin_fails()
+ call s:reset_all_buffers()
+ let other = s:make_buffer_pairs()
+ " Make sure there is not enough room to
+ " split the winfixedbuf window
+ let &winheight=&lines
+ let &winminheight=&lines-2
+ call assert_fails(':bufdo echo 1', 'E36:')
+ set winminheight&vim winheight&vim
+endfunc
+
" vim: shiftwidth=2 sts=2 expandtab
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 152,
/**/
151,
/**/