Blob Blame History Raw
To: vim_dev@googlegroups.com
Subject: Patch 7.4.131
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.4.131
Problem:    Syncbind causes E315 errors in some situations. (Liang Li)
Solution:   Set and restore curbuf in ex_syncbind(). (Christian Brabandt)
Files:	    src/ex_docmd.c, src/testdir/test37.ok


*** ../vim-7.4.130/src/ex_docmd.c	2013-12-11 17:44:33.000000000 +0100
--- src/ex_docmd.c	2013-12-14 12:55:05.000000000 +0100
***************
*** 8054,8059 ****
--- 8054,8061 ----
  {
  #ifdef FEAT_SCROLLBIND
      win_T	*wp;
+     win_T	*save_curwin = curwin;
+     buf_T	*save_curbuf = curbuf;
      long	topline;
      long	y;
      linenr_T	old_linenr = curwin->w_cursor.lnum;
***************
*** 8085,8097 ****
  
  
      /*
!      * set all scrollbind windows to the same topline
       */
-     wp = curwin;
      for (curwin = firstwin; curwin; curwin = curwin->w_next)
      {
  	if (curwin->w_p_scb)
  	{
  	    y = topline - curwin->w_topline;
  	    if (y > 0)
  		scrollup(y, TRUE);
--- 8087,8099 ----
  
  
      /*
!      * Set all scrollbind windows to the same topline.
       */
      for (curwin = firstwin; curwin; curwin = curwin->w_next)
      {
  	if (curwin->w_p_scb)
  	{
+ 	    curbuf = curwin->w_buffer;
  	    y = topline - curwin->w_topline;
  	    if (y > 0)
  		scrollup(y, TRUE);
***************
*** 8105,8111 ****
  #endif
  	}
      }
!     curwin = wp;
      if (curwin->w_p_scb)
      {
  	did_syncbind = TRUE;
--- 8107,8114 ----
  #endif
  	}
      }
!     curwin = save_curwin;
!     curbuf = save_curbuf;
      if (curwin->w_p_scb)
      {
  	did_syncbind = TRUE;
*** ../vim-7.4.130/src/testdir/test37.ok	2010-05-15 13:04:10.000000000 +0200
--- src/testdir/test37.ok	2013-12-14 12:54:57.000000000 +0100
***************
*** 27,33 ****
  
  . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
  :set scrollbind
- zt:
- . line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
  :set scrollbind
! . line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
--- 27,33 ----
  
  . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
  :set scrollbind
  :set scrollbind
! . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
! j:
! . line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
*** ../vim-7.4.130/src/version.c	2013-12-14 12:48:55.000000000 +0100
--- src/version.c	2013-12-14 13:03:51.000000000 +0100
***************
*** 740,741 ****
--- 740,743 ----
  {   /* Add new patch number below this line */
+ /**/
+     131,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
57. You begin to wonder how on earth your service provider is allowed to call
    200 hours per month "unlimited."

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///