0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

updated for version 7.3.1201

Problem:    When a startup script creates a preview window, it probably
            becomes the current window.
Solution:   Make another window the current one. (Christian Brabandt)
This commit is contained in:
Bram Moolenaar 2013-06-15 21:54:16 +02:00
parent 52b91d801a
commit e66f06d819
2 changed files with 21 additions and 1 deletions

View File

@ -2816,7 +2816,25 @@ edit_buffers(parmp)
# ifdef FEAT_AUTOCMD
--autocmd_no_enter;
# endif
win_enter(firstwin, FALSE); /* back to first window */
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
/*
* Avoid making a preview window the current window.
*/
if (firstwin->w_p_pvw)
{
win_T *win;
for (win = firstwin; win != NULL; win = win->w_next)
if (!win->w_p_pvw)
{
firstwin = win;
break;
}
}
#endif
/* make the first window the current window */
win_enter(firstwin, FALSE);
# ifdef FEAT_AUTOCMD
--autocmd_no_leave;
# endif

View File

@ -728,6 +728,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1201,
/**/
1200,
/**/