aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2022-12-02 20:39:24 +0800
committerGitHub <noreply@github.com>2022-12-02 20:39:24 +0800
commit1145a9b2485a4e5072cffe28a958da983cd59e84 (patch)
tree13059f09a9825a7eae3d75c8556436845dc1e492 /src/nvim/diff.c
parent805c83f43e3d6832a54bc4a1de1dd4d4da43d58e (diff)
downloadrneovim-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.c5
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;