From 0cf2dc63bf9e3c94e1373142a6198635efd1c514 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Mon, 14 Feb 2022 20:40:58 +0800 Subject: fix(win_split_ins): do not fail when oldwin is not valid Ref #14240 --- src/nvim/quickfix.c | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/nvim/quickfix.c') diff --git a/src/nvim/quickfix.c b/src/nvim/quickfix.c index bddbd04af9..edd4d17e67 100644 --- a/src/nvim/quickfix.c +++ b/src/nvim/quickfix.c @@ -3646,15 +3646,6 @@ static int qf_open_new_cwindow(qf_info_T *qi, int height) if (win_split(height, flags) == FAIL) { return FAIL; // not enough room for window } - - // User autocommands may have invalidated the previous window after calling - // win_split, so add a check to ensure that the win is still here - if (IS_LL_STACK(qi) && !win_valid(win)) { - // close the window that was supposed to be for the loclist - win_close(curwin, false, false); - return FAIL; - } - RESET_BINDING(curwin); if (IS_LL_STACK(qi)) { -- cgit