mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 11:26:37 +00:00
vim-patch:7.4.2024
Problem: More buf_valid() calls can be optimized.
Solution: Use bufref_valid() instead.
NOTE: Some changes related to channels and the Python and Netbeans interfaces
were obviously left out.
7c0a2f367f
This commit is contained in:
@@ -629,12 +629,12 @@ void free_all_mem(void)
|
||||
* were freed already. */
|
||||
p_acd = false;
|
||||
for (buf = firstbuf; buf != NULL; ) {
|
||||
bufref_T bufref;
|
||||
set_bufref(&bufref, buf);
|
||||
nextbuf = buf->b_next;
|
||||
close_buffer(NULL, buf, DOBUF_WIPE, false);
|
||||
if (buf_valid(buf))
|
||||
buf = nextbuf; /* didn't work, try next one */
|
||||
else
|
||||
buf = firstbuf;
|
||||
// Didn't work, try next one.
|
||||
buf = bufref_valid(&bufref) ? nextbuf : firstbuf;
|
||||
}
|
||||
|
||||
free_cmdline_buf();
|
||||
|
Reference in New Issue
Block a user