mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
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
2e7d89b398
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user