summaryrefslogtreecommitdiffstats
path: root/src/ex_cmds.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2015-02-27 19:34:56 +0100
committerBram Moolenaar <Bram@vim.org>2015-02-27 19:34:56 +0100
commit8da9bbfd02957b79edd595c8c7397453012510b0 (patch)
treecd3bd68b6c30f3d3a778621d4880c1f4f4067e62 /src/ex_cmds.c
parentba17ed6797421b377ec0cac7ec186d24bf5b3979 (diff)
updated for version 7.4.645v7.4.645
Problem: When splitting the window in a BufAdd autocommand while still in the first, empty buffer the window count is wrong. Solution: Do not reset b_nwindows to zero and don't increment it.
Diffstat (limited to 'src/ex_cmds.c')
-rw-r--r--src/ex_cmds.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/ex_cmds.c b/src/ex_cmds.c
index 84928723ef..314a466993 100644
--- a/src/ex_cmds.c
+++ b/src/ex_cmds.c
@@ -3375,7 +3375,6 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
if (buf->b_ml.ml_mfp == NULL) /* no memfile yet */
{
oldbuf = FALSE;
- buf->b_nwindows = 0;
}
else /* existing memfile */
{
@@ -3408,7 +3407,7 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
* Make the (new) buffer the one used by the current window.
* If the old buffer becomes unused, free it if ECMD_HIDE is FALSE.
* If the current buffer was empty and has no file name, curbuf
- * is returned by buflist_new().
+ * is returned by buflist_new(), nothing to do here.
*/
if (buf != curbuf)
{
@@ -3515,8 +3514,6 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags, oldwin)
au_new_curbuf = NULL;
#endif
}
- else
- ++curbuf->b_nwindows;
curwin->w_pcmark.lnum = 1;
curwin->w_pcmark.col = 0;