vim-patch:9.1.0156: Make 'wfb' failing to split still report E1513

Problem:  may not be clear why failing to split causes an ":Xdo" command
          to abort if 'wfb' is set.
Solution: do not return immediately if win_split fails, so E1513 is
          still given. Expect both errors in the test. Also fix tests to
          pass CI.
          (Sean Dewar)

closes: vim/vim#14152

769eb2d0c3

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
This commit is contained in:
zeertzjq
2024-03-11 11:26:02 +08:00
parent d71791a11a
commit 3b3511c4d9
3 changed files with 46 additions and 22 deletions

View File

@@ -457,12 +457,11 @@ void ex_listdo(exarg_T *eap)
}
if (curwin->w_p_wfb) {
// Split the window, which will be 'nowinfixbuf', and set curwin to that
if (win_split(0, 0) == FAIL) {
return; // error message already given
}
(void)win_split(0, 0);
if (curwin->w_p_wfb) {
// Autocommands set 'winfixbuf' or sent us to another window
// with it set. Give up.
// with it set, or we failed to split the window. Give up.
emsg(_(e_winfixbuf_cannot_go_to_buffer));
return;
}