Karsten Hopp f4d9f3
To: vim_dev@googlegroups.com
Karsten Hopp f4d9f3
Subject: Patch 7.4.007
Karsten Hopp f4d9f3
Fcc: outbox
Karsten Hopp f4d9f3
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp f4d9f3
Mime-Version: 1.0
Karsten Hopp f4d9f3
Content-Type: text/plain; charset=UTF-8
Karsten Hopp f4d9f3
Content-Transfer-Encoding: 8bit
Karsten Hopp f4d9f3
------------
Karsten Hopp f4d9f3
Karsten Hopp f4d9f3
Patch 7.4.007
Karsten Hopp f4d9f3
Problem:    Creating a preview window on startup leaves the screen layout in a
Karsten Hopp f4d9f3
	    messed up state. (Marius Gedminas)
Karsten Hopp f4d9f3
Solution:   Don't change firstwin. (Christian Brabandt)
Karsten Hopp f4d9f3
Files:	    src/main.c
Karsten Hopp f4d9f3
Karsten Hopp f4d9f3
Karsten Hopp f4d9f3
*** ../vim-7.4.006/src/main.c	2013-07-03 12:36:49.000000000 +0200
Karsten Hopp f4d9f3
--- src/main.c	2013-08-22 14:02:39.000000000 +0200
Karsten Hopp f4d9f3
***************
Karsten Hopp f4d9f3
*** 2727,2732 ****
Karsten Hopp f4d9f3
--- 2727,2733 ----
Karsten Hopp f4d9f3
      int		arg_idx;		/* index in argument list */
Karsten Hopp f4d9f3
      int		i;
Karsten Hopp f4d9f3
      int		advance = TRUE;
Karsten Hopp f4d9f3
+     win_T	*win;
Karsten Hopp f4d9f3
  
Karsten Hopp f4d9f3
  # ifdef FEAT_AUTOCMD
Karsten Hopp f4d9f3
      /*
Karsten Hopp f4d9f3
***************
Karsten Hopp f4d9f3
*** 2816,2839 ****
Karsten Hopp f4d9f3
  # ifdef FEAT_AUTOCMD
Karsten Hopp f4d9f3
      --autocmd_no_enter;
Karsten Hopp f4d9f3
  # endif
Karsten Hopp f4d9f3
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
Karsten Hopp f4d9f3
!     /*
Karsten Hopp f4d9f3
!      * Avoid making a preview window the current window.
Karsten Hopp f4d9f3
!      */
Karsten Hopp f4d9f3
!     if (firstwin->w_p_pvw)
Karsten Hopp f4d9f3
      {
Karsten Hopp f4d9f3
!        win_T   *win;
Karsten Hopp f4d9f3
! 
Karsten Hopp f4d9f3
!        for (win = firstwin; win != NULL; win = win->w_next)
Karsten Hopp f4d9f3
!            if (!win->w_p_pvw)
Karsten Hopp f4d9f3
!            {
Karsten Hopp f4d9f3
!                firstwin = win;
Karsten Hopp f4d9f3
!                break;
Karsten Hopp f4d9f3
!            }
Karsten Hopp f4d9f3
      }
Karsten Hopp f4d9f3
  #endif
Karsten Hopp f4d9f3
!     /* make the first window the current window */
Karsten Hopp f4d9f3
!     win_enter(firstwin, FALSE);
Karsten Hopp f4d9f3
  
Karsten Hopp f4d9f3
  # ifdef FEAT_AUTOCMD
Karsten Hopp f4d9f3
      --autocmd_no_leave;
Karsten Hopp f4d9f3
--- 2817,2838 ----
Karsten Hopp f4d9f3
  # ifdef FEAT_AUTOCMD
Karsten Hopp f4d9f3
      --autocmd_no_enter;
Karsten Hopp f4d9f3
  # endif
Karsten Hopp f4d9f3
+ 
Karsten Hopp f4d9f3
+     /* make the first window the current window */
Karsten Hopp f4d9f3
+     win = firstwin;
Karsten Hopp f4d9f3
  #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
Karsten Hopp f4d9f3
!     /* Avoid making a preview window the current window. */
Karsten Hopp f4d9f3
!     while (win->w_p_pvw)
Karsten Hopp f4d9f3
      {
Karsten Hopp f4d9f3
! 	win = win->w_next;
Karsten Hopp f4d9f3
! 	if (win == NULL)
Karsten Hopp f4d9f3
! 	{
Karsten Hopp f4d9f3
! 	    win = firstwin;
Karsten Hopp f4d9f3
! 	    break;
Karsten Hopp f4d9f3
! 	}
Karsten Hopp f4d9f3
      }
Karsten Hopp f4d9f3
  #endif
Karsten Hopp f4d9f3
!     win_enter(win, FALSE);
Karsten Hopp f4d9f3
  
Karsten Hopp f4d9f3
  # ifdef FEAT_AUTOCMD
Karsten Hopp f4d9f3
      --autocmd_no_leave;
Karsten Hopp f4d9f3
*** ../vim-7.4.006/src/version.c	2013-08-22 12:06:50.000000000 +0200
Karsten Hopp f4d9f3
--- src/version.c	2013-08-22 14:04:11.000000000 +0200
Karsten Hopp f4d9f3
***************
Karsten Hopp f4d9f3
*** 729,730 ****
Karsten Hopp f4d9f3
--- 729,732 ----
Karsten Hopp f4d9f3
  {   /* Add new patch number below this line */
Karsten Hopp f4d9f3
+ /**/
Karsten Hopp f4d9f3
+     7,
Karsten Hopp f4d9f3
  /**/
Karsten Hopp f4d9f3
Karsten Hopp f4d9f3
-- 
Karsten Hopp f4d9f3
hundred-and-one symptoms of being an internet addict:
Karsten Hopp f4d9f3
105. When someone asks you for your address, you tell them your URL.
Karsten Hopp f4d9f3
Karsten Hopp f4d9f3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp f4d9f3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp f4d9f3
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp f4d9f3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///