diff options
author | Bram Moolenaar <Bram@vim.org> | 2009-02-22 01:37:59 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2009-02-22 01:37:59 +0000 |
commit | 884ae6446f2250ea236f05f8342e4f98eb3fca0d (patch) | |
tree | c77785190540b6e48370ddac45b6f9684709a0db /src/window.c | |
parent | ffcce30fdb46c040b43b7a868640afbd3df0ccb3 (diff) | |
download | vim-git-884ae6446f2250ea236f05f8342e4f98eb3fca0d.tar.gz |
updated for version 7.2-120v7.2.120
Diffstat (limited to 'src/window.c')
-rw-r--r-- | src/window.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/window.c b/src/window.c index 2c14e5053..81caee932 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 @@ win_split_ins(size, flags, newwin, dir) 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 @@ win_split_ins(size, flags, newwin, dir) * 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 @@ win_init(newp, oldp) 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 @@ win_alloc_firstwin(oldwin) 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. */ |