]> granicus.if.org Git - vim/commitdiff
updated for version 7.4.131 v7.4.131
authorBram Moolenaar <Bram@vim.org>
Sat, 14 Dec 2013 12:06:17 +0000 (13:06 +0100)
committerBram Moolenaar <Bram@vim.org>
Sat, 14 Dec 2013 12:06:17 +0000 (13:06 +0100)
Problem:    Syncbind causes E315 errors in some situations. (Liang Li)
Solution:   Set and restore curbuf in ex_syncbind(). (Christian Brabandt)

src/ex_docmd.c
src/testdir/test37.ok
src/version.c

index 5bbc4c305b0cb247273fb307206c94c67389249b..bf5f81cca9d2113d785635ed08f553eb96f5a8c2 100644 (file)
@@ -8054,6 +8054,8 @@ ex_syncbind(eap)
 {
 #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,13 +8087,13 @@ ex_syncbind(eap)
 
 
     /*
-     * set all scrollbind windows to the same topline
+     * Set all scrollbind windows to the same topline.
      */
-    wp = curwin;
     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,7 +8107,8 @@ ex_syncbind(eap)
 #endif
        }
     }
-    curwin = wp;
+    curwin = save_curwin;
+    curbuf = save_curbuf;
     if (curwin->w_p_scb)
     {
        did_syncbind = TRUE;
index a9092a402c4525950d3c1fe42d0c90842c2a4c4d..d0b74853b3b9c7ea99a39ec0cc898205cb6fd5f0 100644 (file)
@@ -27,7 +27,7 @@ UTSRQPONMLKJIHGREDCBA9876543210 02
 
 . line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
 :set scrollbind
-zt:
-. line 15 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 15
 :set scrollbind
-. line 11 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 11
+. line 16 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 16
+\17j:
+. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12
index 4f2cf9d4d31e1239d0ca4c76c27d0c63a81917c5..6d12c6a78d9f97396d4350cb6c8e42e8fd83845c 100644 (file)
@@ -738,6 +738,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    131,
 /**/
     130,
 /**/