aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2024-07-11 06:26:22 +0800
committerGitHub <noreply@github.com>2024-07-11 06:26:22 +0800
commit07c1996c8ad69bae559406ae17c415e6cbd345e8 (patch)
treee1a81fca5f91448a0ea8a8f0389b4867fd8da69c /src
parent3c5abf01bfab6135cb821046eb229c0af51498b4 (diff)
downloadrneovim-07c1996c8ad69bae559406ae17c415e6cbd345e8.tar.gz
rneovim-07c1996c8ad69bae559406ae17c415e6cbd345e8.tar.bz2
rneovim-07c1996c8ad69bae559406ae17c415e6cbd345e8.zip
vim-patch:9.1.0556: :bwipe doesn't remove file from jumplist of other tabpages (#29651)
Problem: :bwipe doesn't remove file from jumplist and tagstack of other tabpages. Time complexity of mark_forget_file() is O(n^2) when removing all entries (after v9.1.0554) Solution: Use FOR_ALL_TAB_WINDOWS(). Start the loops over the arrays from the end instead of the start (zeertzjq) closes: vim/vim#15199 https://github.com/vim/vim/commit/2e7d89b39883b0cfd3e615b02bd55186e00fb7ce
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 6878b02a6e..d894844c6d 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -699,7 +699,7 @@ bool close_buffer(win_T *win, buf_T *buf, int action, bool abort_if_last, bool i
if (buf->b_nwindows > 0) {
return false;
}
- FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
+ FOR_ALL_TAB_WINDOWS(tp, wp) {
mark_forget_file(wp, buf->b_fnum);
}
if (buf->b_sfname != buf->b_ffname) {