mirror of
https://github.com/neovim/neovim.git
synced 2025-12-08 07:32:40 +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:
@@ -5914,10 +5914,13 @@ ex_win_close (
|
||||
need_hide = (bufIsChanged(buf) && buf->b_nwindows <= 1);
|
||||
if (need_hide && !P_HID(buf) && !forceit) {
|
||||
if ((p_confirm || cmdmod.confirm) && p_write) {
|
||||
dialog_changed(buf, FALSE);
|
||||
if (buf_valid(buf) && bufIsChanged(buf))
|
||||
bufref_T bufref;
|
||||
set_bufref(&bufref, buf);
|
||||
dialog_changed(buf, false);
|
||||
if (bufref_valid(&bufref) && bufIsChanged(buf)) {
|
||||
return;
|
||||
need_hide = FALSE;
|
||||
}
|
||||
need_hide = false;
|
||||
} else {
|
||||
EMSG(_(e_nowrtmsg));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user