updated for version 7.2-120
diff --git a/src/window.c b/src/window.c
index 2c14e50..81caee9 100644
--- a/src/window.c
+++ b/src/window.c
@@ -12,7 +12,7 @@
static int path_is_url __ARGS((char_u *p));
#if defined(FEAT_WINDOWS) || defined(PROTO)
static int win_split_ins __ARGS((int size, int flags, win_T *newwin, int dir));
-static void win_init __ARGS((win_T *newp, win_T *oldp));
+static void win_init __ARGS((win_T *newp, win_T *oldp, int flags));
static void frame_comp_pos __ARGS((frame_T *topfrp, int *row, int *col));
static void frame_setheight __ARGS((frame_T *curfrp, int height));
#ifdef FEAT_VERTSPLIT
@@ -911,7 +911,7 @@
return FAIL;
/* make the contents of the new window the same as the current one */
- win_init(wp, curwin);
+ win_init(wp, curwin, flags);
}
/*
@@ -1160,11 +1160,15 @@
* Initialize window "newp" from window "oldp".
* Used when splitting a window and when creating a new tab page.
* The windows will both edit the same buffer.
+ * WSP_NEWLOC may be specified in flags to prevent the location list from
+ * being copied.
*/
+/*ARGSUSED*/
static void
-win_init(newp, oldp)
+win_init(newp, oldp, flags)
win_T *newp;
win_T *oldp;
+ int flags;
{
int i;
@@ -1189,7 +1193,14 @@
copy_jumplist(oldp, newp);
#endif
#ifdef FEAT_QUICKFIX
- copy_loclist(oldp, newp);
+ if (flags & WSP_NEWLOC)
+ {
+ /* Don't copy the location list. */
+ newp->w_llist = NULL;
+ newp->w_llist_ref = NULL;
+ }
+ else
+ copy_loclist(oldp, newp);
#endif
if (oldp->w_localdir != NULL)
newp->w_localdir = vim_strsave(oldp->w_localdir);
@@ -3219,7 +3230,7 @@
else
{
/* First window in new tab page, initialize it from "oldwin". */
- win_init(curwin, oldwin);
+ win_init(curwin, oldwin, 0);
# ifdef FEAT_SCROLLBIND
/* We don't want scroll-binding in the first window. */