Skip to content

Commit 56f7bc1

Browse files
committed
updated for version 7.4.007
Problem: Creating a preview window on startup leaves the screen layout in a messed up state. (Marius Gedminas) Solution: Don't change firstwin. (Christian Brabandt)
1 parent d2935a0 commit 56f7bc1

File tree

2 files changed

+15
-14
lines changed

2 files changed

+15
-14
lines changed

src/main.c

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2727,6 +2727,7 @@ edit_buffers(parmp)
27272727
int arg_idx; /* index in argument list */
27282728
int i;
27292729
int advance = TRUE;
2730+
win_T *win;
27302731

27312732
# ifdef FEAT_AUTOCMD
27322733
/*
@@ -2816,24 +2817,22 @@ edit_buffers(parmp)
28162817
# ifdef FEAT_AUTOCMD
28172818
--autocmd_no_enter;
28182819
# endif
2820+
2821+
/* make the first window the current window */
2822+
win = firstwin;
28192823
#if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
2820-
/*
2821-
* Avoid making a preview window the current window.
2822-
*/
2823-
if (firstwin->w_p_pvw)
2824+
/* Avoid making a preview window the current window. */
2825+
while (win->w_p_pvw)
28242826
{
2825-
win_T *win;
2826-
2827-
for (win = firstwin; win != NULL; win = win->w_next)
2828-
if (!win->w_p_pvw)
2829-
{
2830-
firstwin = win;
2831-
break;
2832-
}
2827+
win = win->w_next;
2828+
if (win == NULL)
2829+
{
2830+
win = firstwin;
2831+
break;
2832+
}
28332833
}
28342834
#endif
2835-
/* make the first window the current window */
2836-
win_enter(firstwin, FALSE);
2835+
win_enter(win, FALSE);
28372836

28382837
# ifdef FEAT_AUTOCMD
28392838
--autocmd_no_leave;

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,8 @@ static char *(features[]) =
727727

728728
static int included_patches[] =
729729
{ /* Add new patch number below this line */
730+
/**/
731+
7,
730732
/**/
731733
6,
732734
/**/

0 commit comments

Comments
 (0)