From 1145a9b2485a4e5072cffe28a958da983cd59e84 Mon Sep 17 00:00:00 2001 From: zeertzjq Date: Fri, 2 Dec 2022 20:39:24 +0800 Subject: feat(aucmd_win): allow crazy things with hidden buffers (#21250) Problem: Crash when doing crazy things with hidden buffers. Solution: Dynamically allocate the list of autocommand windows. --- src/nvim/diff.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'src/nvim/diff.c') diff --git a/src/nvim/diff.c b/src/nvim/diff.c index ac637c2c70..011632a4ef 100644 --- a/src/nvim/diff.c +++ b/src/nvim/diff.c @@ -2944,11 +2944,6 @@ void ex_diffgetput(exarg_T *eap) // Set curwin/curbuf to buf and save a few things. aucmd_prepbuf(&aco, curtab->tp_diffbuf[idx_other]); - if (curbuf != curtab->tp_diffbuf[idx_other]) { - // Could not find a window for this buffer, the rest is likely to - // fail. - goto theend; - } } const int idx_from = eap->cmdidx == CMD_diffget ? idx_other : idx_cur; -- cgit