From: Bram Moolenaar Date: Sat, 15 Jun 2013 19:54:16 +0000 (+0200) Subject: updated for version 7.3.1201 X-Git-Tag: v7.3.1201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e66f06d819c2bbb09205a5c28e7ccf481f3ea9e7;p=vim 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) --- diff --git a/src/main.c b/src/main.c index 9c11b432a..5c1405ea3 100644 --- a/src/main.c +++ b/src/main.c @@ -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 diff --git a/src/version.c b/src/version.c index bb9edce1f..2f47dad7a 100644 --- a/src/version.c +++ b/src/version.c @@ -728,6 +728,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1201, /**/ 1200, /**/