mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
updated for version 7.2-120
This commit is contained in:
parent
ffcce30fdb
commit
884ae6446f
@ -1419,6 +1419,7 @@ qf_jump(qi, dir, errornr, forceit)
|
||||
int opened_window = FALSE;
|
||||
win_T *win;
|
||||
win_T *altwin;
|
||||
int flags;
|
||||
#endif
|
||||
win_T *oldwin = curwin;
|
||||
int print_message = TRUE;
|
||||
@ -1531,7 +1532,6 @@ qf_jump(qi, dir, errornr, forceit)
|
||||
if (qf_ptr->qf_type == 1 && (!curwin->w_buffer->b_help || cmdmod.tab != 0))
|
||||
{
|
||||
win_T *wp;
|
||||
int n;
|
||||
|
||||
if (cmdmod.tab != 0)
|
||||
wp = NULL;
|
||||
@ -1547,13 +1547,16 @@ qf_jump(qi, dir, errornr, forceit)
|
||||
* Split off help window; put it at far top if no position
|
||||
* specified, the current window is vertically split and narrow.
|
||||
*/
|
||||
n = WSP_HELP;
|
||||
flags = WSP_HELP;
|
||||
# ifdef FEAT_VERTSPLIT
|
||||
if (cmdmod.split == 0 && curwin->w_width != Columns
|
||||
&& curwin->w_width < 80)
|
||||
n |= WSP_TOP;
|
||||
flags |= WSP_TOP;
|
||||
# endif
|
||||
if (win_split(0, n) == FAIL)
|
||||
if (qi != &ql_info)
|
||||
flags |= WSP_NEWLOC; /* don't copy the location list */
|
||||
|
||||
if (win_split(0, flags) == FAIL)
|
||||
goto theend;
|
||||
opened_window = TRUE; /* close it when fail */
|
||||
|
||||
@ -1563,7 +1566,6 @@ qf_jump(qi, dir, errornr, forceit)
|
||||
if (qi != &ql_info) /* not a quickfix list */
|
||||
{
|
||||
/* The new window should use the supplied location list */
|
||||
qf_free_all(curwin);
|
||||
curwin->w_llist = qi;
|
||||
qi->qf_refcount++;
|
||||
}
|
||||
@ -1624,7 +1626,10 @@ win_found:
|
||||
{
|
||||
ll_ref = curwin->w_llist_ref;
|
||||
|
||||
if (win_split(0, WSP_ABOVE) == FAIL)
|
||||
flags = WSP_ABOVE;
|
||||
if (ll_ref != NULL)
|
||||
flags |= WSP_NEWLOC;
|
||||
if (win_split(0, flags) == FAIL)
|
||||
goto failed; /* not enough room for window */
|
||||
opened_window = TRUE; /* close it when fail */
|
||||
p_swb = empty_option; /* don't split again */
|
||||
@ -1636,7 +1641,6 @@ win_found:
|
||||
{
|
||||
/* The new window should use the location list from the
|
||||
* location list window */
|
||||
qf_free_all(curwin);
|
||||
curwin->w_llist = ll_ref;
|
||||
ll_ref->qf_refcount++;
|
||||
}
|
||||
@ -2311,15 +2315,12 @@ ex_copen(eap)
|
||||
if (eap->cmdidx == CMD_copen || eap->cmdidx == CMD_cwindow)
|
||||
/* Create the new window at the very bottom. */
|
||||
win_goto(lastwin);
|
||||
if (win_split(height, WSP_BELOW) == FAIL)
|
||||
if (win_split(height, WSP_BELOW | WSP_NEWLOC) == FAIL)
|
||||
return; /* not enough room for window */
|
||||
#ifdef FEAT_SCROLLBIND
|
||||
curwin->w_p_scb = FALSE;
|
||||
#endif
|
||||
|
||||
/* Remove the location list for the quickfix window */
|
||||
qf_free_all(curwin);
|
||||
|
||||
if (eap->cmdidx == CMD_lopen || eap->cmdidx == CMD_lwindow)
|
||||
{
|
||||
/*
|
||||
|
@ -676,6 +676,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
120,
|
||||
/**/
|
||||
119,
|
||||
/**/
|
||||
|
@ -1057,6 +1057,7 @@ extern char *(*dyn_libintl_textdomain)(const char *domainname);
|
||||
#define WSP_HELP 16 /* creating the help window */
|
||||
#define WSP_BELOW 32 /* put new window below/right */
|
||||
#define WSP_ABOVE 64 /* put new window above/left */
|
||||
#define WSP_NEWLOC 128 /* don't copy location list */
|
||||
|
||||
/*
|
||||
* arguments for gui_set_shellsize()
|
||||
|
21
src/window.c
21
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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user