Karsten Hopp d0ca2e
To: vim_dev@googlegroups.com
Karsten Hopp d0ca2e
Subject: Patch 7.4.131
Karsten Hopp d0ca2e
Fcc: outbox
Karsten Hopp d0ca2e
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp d0ca2e
Mime-Version: 1.0
Karsten Hopp d0ca2e
Content-Type: text/plain; charset=UTF-8
Karsten Hopp d0ca2e
Content-Transfer-Encoding: 8bit
Karsten Hopp d0ca2e
------------
Karsten Hopp d0ca2e
Karsten Hopp d0ca2e
Patch 7.4.131
Karsten Hopp d0ca2e
Problem:    Syncbind causes E315 errors in some situations. (Liang Li)
Karsten Hopp d0ca2e
Solution:   Set and restore curbuf in ex_syncbind(). (Christian Brabandt)
Karsten Hopp d0ca2e
Files:	    src/ex_docmd.c, src/testdir/test37.ok
Karsten Hopp d0ca2e
Karsten Hopp d0ca2e
Karsten Hopp d0ca2e
*** ../vim-7.4.130/src/ex_docmd.c	2013-12-11 17:44:33.000000000 +0100
Karsten Hopp d0ca2e
--- src/ex_docmd.c	2013-12-14 12:55:05.000000000 +0100
Karsten Hopp d0ca2e
***************
Karsten Hopp d0ca2e
*** 8054,8059 ****
Karsten Hopp d0ca2e
--- 8054,8061 ----
Karsten Hopp d0ca2e
  {
Karsten Hopp d0ca2e
  #ifdef FEAT_SCROLLBIND
Karsten Hopp d0ca2e
      win_T	*wp;
Karsten Hopp d0ca2e
+     win_T	*save_curwin = curwin;
Karsten Hopp d0ca2e
+     buf_T	*save_curbuf = curbuf;
Karsten Hopp d0ca2e
      long	topline;
Karsten Hopp d0ca2e
      long	y;
Karsten Hopp d0ca2e
      linenr_T	old_linenr = curwin->w_cursor.lnum;
Karsten Hopp d0ca2e
***************
Karsten Hopp d0ca2e
*** 8085,8097 ****
Karsten Hopp d0ca2e
  
Karsten Hopp d0ca2e
  
Karsten Hopp d0ca2e
      /*
Karsten Hopp d0ca2e
!      * set all scrollbind windows to the same topline
Karsten Hopp d0ca2e
       */
Karsten Hopp d0ca2e
-     wp = curwin;
Karsten Hopp d0ca2e
      for (curwin = firstwin; curwin; curwin = curwin->w_next)
Karsten Hopp d0ca2e
      {
Karsten Hopp d0ca2e
  	if (curwin->w_p_scb)
Karsten Hopp d0ca2e
  	{
Karsten Hopp d0ca2e
  	    y = topline - curwin->w_topline;
Karsten Hopp d0ca2e
  	    if (y > 0)
Karsten Hopp d0ca2e
  		scrollup(y, TRUE);
Karsten Hopp d0ca2e
--- 8087,8099 ----
Karsten Hopp d0ca2e
  
Karsten Hopp d0ca2e
  
Karsten Hopp d0ca2e
      /*
Karsten Hopp d0ca2e
!      * Set all scrollbind windows to the same topline.
Karsten Hopp d0ca2e
       */
Karsten Hopp d0ca2e
      for (curwin = firstwin; curwin; curwin = curwin->w_next)
Karsten Hopp d0ca2e
      {
Karsten Hopp d0ca2e
  	if (curwin->w_p_scb)
Karsten Hopp d0ca2e
  	{
Karsten Hopp d0ca2e
+ 	    curbuf = curwin->w_buffer;
Karsten Hopp d0ca2e
  	    y = topline - curwin->w_topline;
Karsten Hopp d0ca2e
  	    if (y > 0)
Karsten Hopp d0ca2e
  		scrollup(y, TRUE);
Karsten Hopp d0ca2e
***************
Karsten Hopp d0ca2e
*** 8105,8111 ****
Karsten Hopp d0ca2e
  #endif
Karsten Hopp d0ca2e
  	}
Karsten Hopp d0ca2e
      }
Karsten Hopp d0ca2e
!     curwin = wp;
Karsten Hopp d0ca2e
      if (curwin->w_p_scb)
Karsten Hopp d0ca2e
      {
Karsten Hopp d0ca2e
  	did_syncbind = TRUE;
Karsten Hopp d0ca2e
--- 8107,8114 ----
Karsten Hopp d0ca2e
  #endif
Karsten Hopp d0ca2e
  	}
Karsten Hopp d0ca2e
      }
Karsten Hopp d0ca2e
!     curwin = save_curwin;
Karsten Hopp d0ca2e
!     curbuf = save_curbuf;
Karsten Hopp d0ca2e
      if (curwin->w_p_scb)
Karsten Hopp d0ca2e
      {
Karsten Hopp d0ca2e
  	did_syncbind = TRUE;
Karsten Hopp d0ca2e
*** ../vim-7.4.130/src/testdir/test37.ok	2010-05-15 13:04:10.000000000 +0200
Karsten Hopp d0ca2e
--- src/testdir/test37.ok	2013-12-14 12:54:57.000000000 +0100
Karsten Hopp d0ca2e
***************
Karsten Hopp d0ca2e
*** 27,33 ****
Karsten Hopp d0ca2e
  
Karsten Hopp d0ca2e
  . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
Karsten Hopp d0ca2e
  :set scrollbind
Karsten Hopp d0ca2e
- zt:
Karsten Hopp d0ca2e
- . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
Karsten Hopp d0ca2e
  :set scrollbind
Karsten Hopp d0ca2e
! . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
Karsten Hopp d0ca2e
--- 27,33 ----
Karsten Hopp d0ca2e
  
Karsten Hopp d0ca2e
  . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
Karsten Hopp d0ca2e
  :set scrollbind
Karsten Hopp d0ca2e
  :set scrollbind
Karsten Hopp d0ca2e
! . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
Karsten Hopp d0ca2e
! ?j:
Karsten Hopp d0ca2e
! . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
Karsten Hopp d0ca2e
*** ../vim-7.4.130/src/version.c	2013-12-14 12:48:55.000000000 +0100
Karsten Hopp d0ca2e
--- src/version.c	2013-12-14 13:03:51.000000000 +0100
Karsten Hopp d0ca2e
***************
Karsten Hopp d0ca2e
*** 740,741 ****
Karsten Hopp d0ca2e
--- 740,743 ----
Karsten Hopp d0ca2e
  {   /* Add new patch number below this line */
Karsten Hopp d0ca2e
+ /**/
Karsten Hopp d0ca2e
+     131,
Karsten Hopp d0ca2e
  /**/
Karsten Hopp d0ca2e
Karsten Hopp d0ca2e
-- 
Karsten Hopp d0ca2e
hundred-and-one symptoms of being an internet addict:
Karsten Hopp d0ca2e
57. You begin to wonder how on earth your service provider is allowed to call
Karsten Hopp d0ca2e
    200 hours per month "unlimited."
Karsten Hopp d0ca2e
Karsten Hopp d0ca2e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp d0ca2e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp d0ca2e
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp d0ca2e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///