diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-12-14 13:06:17 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-12-14 13:06:17 +0100 |
commit | dedd1b0aba7e7125081fd3e71b629058d48dac1d (patch) | |
tree | e17d7260b8901deb52a29e3d0de399ed18cdb2f2 | |
parent | 0bd7b3f4ce0e70ff762689dc0fd9f41b54692694 (diff) |
updated for version 7.4.131v7.4.131
Problem: Syncbind causes E315 errors in some situations. (Liang Li)
Solution: Set and restore curbuf in ex_syncbind(). (Christian Brabandt)
-rw-r--r-- | src/ex_docmd.c | 9 | ||||
-rw-r--r-- | src/testdir/test37.ok | 6 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/src/ex_docmd.c b/src/ex_docmd.c index 5bbc4c305b..bf5f81cca9 100644 --- a/src/ex_docmd.c +++ b/src/ex_docmd.c @@ -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; diff --git a/src/testdir/test37.ok b/src/testdir/test37.ok index a9092a402c..d0b74853b3 100644 --- a/src/testdir/test37.ok +++ b/src/testdir/test37.ok @@ -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 +j: +. line 12 ZYXWVUTSRQPONMLKJIHGREDCBA9876543210 12 diff --git a/src/version.c b/src/version.c index 4f2cf9d4d3..6d12c6a78d 100644 --- a/src/version.c +++ b/src/version.c @@ -739,6 +739,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 131, +/**/ 130, /**/ 129, |