forked from aniani/vim
patch 8.2.3547: opening the quickfix window triggers BufWinEnter twice
Problem: Opening the quickfix window triggers BufWinEnter twice. (Yorick Peterse) Solution: Only trigger BufWinEnter with "quickfix". (closes #9022)
This commit is contained in:
@@ -2473,6 +2473,7 @@ theend:
|
||||
* ECMD_FORCEIT: ! used for Ex command
|
||||
* ECMD_ADDBUF: don't edit, just add to buffer list
|
||||
* ECMD_ALTBUF: like ECMD_ADDBUF and also set the alternate file
|
||||
* ECMD_NOWINENTER: Do not trigger BufWinEnter
|
||||
* oldwin: Should be "curwin" when editing a new buffer in the current
|
||||
* window, NULL when splitting the window first. When not NULL info
|
||||
* of the previous buffer for "oldwin" is stored.
|
||||
@@ -3030,6 +3031,8 @@ do_ecmd(
|
||||
/*
|
||||
* Open the buffer and read the file.
|
||||
*/
|
||||
if (flags & ECMD_NOWINENTER)
|
||||
readfile_flags |= READ_NOWINENTER;
|
||||
#if defined(FEAT_EVAL)
|
||||
if (should_abort(open_buffer(FALSE, eap, readfile_flags)))
|
||||
retval = FAIL;
|
||||
@@ -3051,10 +3054,11 @@ do_ecmd(
|
||||
// changed by the user.
|
||||
do_modelines(OPT_WINONLY);
|
||||
|
||||
apply_autocmds_retval(EVENT_BUFENTER, NULL, NULL, FALSE, curbuf,
|
||||
&retval);
|
||||
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL, FALSE, curbuf,
|
||||
&retval);
|
||||
apply_autocmds_retval(EVENT_BUFENTER, NULL, NULL, FALSE,
|
||||
curbuf, &retval);
|
||||
if ((flags & ECMD_NOWINENTER) == 0)
|
||||
apply_autocmds_retval(EVENT_BUFWINENTER, NULL, NULL, FALSE,
|
||||
curbuf, &retval);
|
||||
}
|
||||
check_arg_idx(curwin);
|
||||
|
||||
|
Reference in New Issue
Block a user