diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-12-02 20:39:24 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-02 20:39:24 +0800 |
commit | 1145a9b2485a4e5072cffe28a958da983cd59e84 (patch) | |
tree | 13059f09a9825a7eae3d75c8556436845dc1e492 /src/nvim/diff.c | |
parent | 805c83f43e3d6832a54bc4a1de1dd4d4da43d58e (diff) | |
download | rneovim-1145a9b2485a4e5072cffe28a958da983cd59e84.tar.gz rneovim-1145a9b2485a4e5072cffe28a958da983cd59e84.tar.bz2 rneovim-1145a9b2485a4e5072cffe28a958da983cd59e84.zip |
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.
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r-- | src/nvim/diff.c | 5 |
1 files changed, 0 insertions, 5 deletions
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; |