comparison src/ex_docmd.c @ 9487:69ed2c9d34a6 v7.4.2024

commit https://github.com/vim/vim/commit/7c0a2f367f2507669560b1a66423155c70d2e75b Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jul 10 22:11:16 2016 +0200 patch 7.4.2024 Problem: More buf_valid() calls can be optimized. Solution: Use bufref_valid() instead.
author Christian Brabandt <cb@256bit.org>
date Sun, 10 Jul 2016 22:15:06 +0200
parents cdffa812f9d1
children b2aada04d84e
comparison
equal deleted inserted replaced
9486:b931ed8a6782 9487:69ed2c9d34a6
7320 if (need_hide && !P_HID(buf) && !forceit) 7320 if (need_hide && !P_HID(buf) && !forceit)
7321 { 7321 {
7322 # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG) 7322 # if defined(FEAT_GUI_DIALOG) || defined(FEAT_CON_DIALOG)
7323 if ((p_confirm || cmdmod.confirm) && p_write) 7323 if ((p_confirm || cmdmod.confirm) && p_write)
7324 { 7324 {
7325 bufref_T bufref;
7326
7327 set_bufref(&bufref, buf);
7325 dialog_changed(buf, FALSE); 7328 dialog_changed(buf, FALSE);
7326 if (buf_valid(buf) && bufIsChanged(buf)) 7329 if (bufref_valid(&bufref) && bufIsChanged(buf))
7327 return; 7330 return;
7328 need_hide = FALSE; 7331 need_hide = FALSE;
7329 } 7332 }
7330 else 7333 else
7331 # endif 7334 # endif