mirror of
https://github.com/neovim/neovim.git
synced 2025-10-16 23:06:14 +00:00
vim-patch:7.4.2023
Problem: buflist_findname_stat() may find a dummy buffer. Solution: Set the BF_DUMMY flag after loading a dummy buffer. Start finding buffers from the end of the list. NOTE: In Neovim, buflist_findname_stat() was replaced by buflist_findname_file_id() inc41535d69
.ea3f2e7be4
This commit is contained in:
@@ -3778,10 +3778,15 @@ load_dummy_buffer (
|
||||
}
|
||||
}
|
||||
|
||||
/* restore curwin/curbuf and a few other things */
|
||||
// Restore curwin/curbuf and a few other things.
|
||||
aucmd_restbuf(&aco);
|
||||
if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe))
|
||||
wipe_buffer(newbuf_to_wipe, FALSE);
|
||||
if (newbuf_to_wipe != NULL && buf_valid(newbuf_to_wipe)) {
|
||||
wipe_buffer(newbuf_to_wipe, false);
|
||||
}
|
||||
|
||||
// Add back the "dummy" flag, otherwise buflist_findname_file_id()
|
||||
// won't skip it.
|
||||
newbuf->b_flags |= BF_DUMMY;
|
||||
}
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user