mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
updated for version 7.0221
This commit is contained in:
@@ -5175,8 +5175,9 @@ free_old_sub()
|
|||||||
#if (defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)) || defined(PROTO)
|
#if (defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)) || defined(PROTO)
|
||||||
/*
|
/*
|
||||||
* Set up for a tagpreview.
|
* Set up for a tagpreview.
|
||||||
|
* Return TRUE when it was created.
|
||||||
*/
|
*/
|
||||||
void
|
int
|
||||||
prepare_tagpreview()
|
prepare_tagpreview()
|
||||||
{
|
{
|
||||||
win_T *wp;
|
win_T *wp;
|
||||||
@@ -5202,7 +5203,7 @@ prepare_tagpreview()
|
|||||||
*/
|
*/
|
||||||
if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0)
|
if (win_split(g_do_tagpreview > 0 ? g_do_tagpreview : 0, 0)
|
||||||
== FAIL)
|
== FAIL)
|
||||||
return;
|
return FALSE;
|
||||||
curwin->w_p_pvw = TRUE;
|
curwin->w_p_pvw = TRUE;
|
||||||
curwin->w_p_wfh = TRUE;
|
curwin->w_p_wfh = TRUE;
|
||||||
# ifdef FEAT_SCROLLBIND
|
# ifdef FEAT_SCROLLBIND
|
||||||
@@ -5214,8 +5215,10 @@ prepare_tagpreview()
|
|||||||
# ifdef FEAT_FOLDING
|
# ifdef FEAT_FOLDING
|
||||||
curwin->w_p_fdc = 0; /* no 'foldcolumn' */
|
curwin->w_p_fdc = 0; /* no 'foldcolumn' */
|
||||||
# endif
|
# endif
|
||||||
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -6837,11 +6840,11 @@ ex_drop(eap)
|
|||||||
exarg_T *eap;
|
exarg_T *eap;
|
||||||
{
|
{
|
||||||
int split = FALSE;
|
int split = FALSE;
|
||||||
int incurwin = FALSE;
|
|
||||||
char_u *arg;
|
|
||||||
char_u *first = NULL;
|
|
||||||
win_T *wp;
|
win_T *wp;
|
||||||
buf_T *buf;
|
buf_T *buf;
|
||||||
|
# ifdef FEAT_WINDOWS
|
||||||
|
tabpage_T *tp;
|
||||||
|
# endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check if the first argument is already being edited in a window. If
|
* Check if the first argument is already being edited in a window. If
|
||||||
@@ -6851,38 +6854,40 @@ ex_drop(eap)
|
|||||||
* This also ignores wildcards, since it is very unlikely the user is
|
* This also ignores wildcards, since it is very unlikely the user is
|
||||||
* editing a file name with a wildcard character.
|
* editing a file name with a wildcard character.
|
||||||
*/
|
*/
|
||||||
arg = vim_strsave(eap->arg);
|
set_arglist(eap->arg);
|
||||||
if (arg != NULL)
|
|
||||||
|
# ifdef FEAT_WINDOWS
|
||||||
|
if (cmdmod.tab)
|
||||||
{
|
{
|
||||||
/* Get the first argument, remove quotes, make it a full path. */
|
/* ":tab drop file ...": open a tab for each argument that isn't
|
||||||
first = fix_fname(arg);
|
* edited in a window yet. It's like ":tab all" but without closing
|
||||||
if (first != NULL)
|
* windows or tabs. */
|
||||||
|
ex_all(eap);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
# endif
|
||||||
{
|
{
|
||||||
buf = buflist_findname(first);
|
/* ":drop file ...": Edit the first argument. Jump to an existing
|
||||||
FOR_ALL_WINDOWS(wp)
|
* window if possible, edit in current window if the current buffer
|
||||||
|
* can be abandoned, otherwise open a new window. */
|
||||||
|
buf = buflist_findnr(ARGLIST[0].ae_fnum);
|
||||||
|
|
||||||
|
FOR_ALL_TAB_WINDOWS(tp, wp)
|
||||||
{
|
{
|
||||||
if (wp->w_buffer == buf)
|
if (wp->w_buffer == buf)
|
||||||
{
|
{
|
||||||
incurwin = TRUE;
|
|
||||||
# ifdef FEAT_WINDOWS
|
# ifdef FEAT_WINDOWS
|
||||||
|
goto_tabpage_tp(tp);
|
||||||
win_enter(wp, TRUE);
|
win_enter(wp, TRUE);
|
||||||
break;
|
# ifdef FEAT_GUI_TABLINE
|
||||||
|
if (gui_use_tabline())
|
||||||
|
gui_mch_set_curtab(tabpage_index(curtab));
|
||||||
|
# endif
|
||||||
# endif
|
# endif
|
||||||
}
|
|
||||||
}
|
|
||||||
vim_free(first);
|
|
||||||
|
|
||||||
if (incurwin)
|
|
||||||
{
|
|
||||||
/* Already editing the file. Redefine the argument list. */
|
|
||||||
set_arglist(eap->arg);
|
|
||||||
curwin->w_arg_idx = 0;
|
curwin->w_arg_idx = 0;
|
||||||
vim_free(arg);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
vim_free(arg);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check whether the current buffer is changed. If so, we will need
|
* Check whether the current buffer is changed. If so, we will need
|
||||||
@@ -6904,14 +6909,15 @@ ex_drop(eap)
|
|||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Fake a ":snext" or ":next" command, redefine the arglist. */
|
/* Fake a ":sfirst" or ":first" command edit the first argument. */
|
||||||
if (split)
|
if (split)
|
||||||
{
|
{
|
||||||
eap->cmdidx = CMD_snext;
|
eap->cmdidx = CMD_sfirst;
|
||||||
eap->cmd[0] = 's';
|
eap->cmd[0] = 's';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
eap->cmdidx = CMD_next;
|
eap->cmdidx = CMD_first;
|
||||||
ex_next(eap);
|
ex_rewind(eap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@@ -8,7 +8,7 @@ void truncate_spaces __ARGS((char_u *line));
|
|||||||
void backspace_until_column __ARGS((int col));
|
void backspace_until_column __ARGS((int col));
|
||||||
int vim_is_ctrl_x_key __ARGS((int c));
|
int vim_is_ctrl_x_key __ARGS((int c));
|
||||||
int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
|
int ins_compl_add_infercase __ARGS((char_u *str, int len, int icase, char_u *fname, int dir, int flags));
|
||||||
int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u *extra, int cdir, int flags));
|
int ins_compl_add __ARGS((char_u *str, int len, int icase, char_u *fname, char_u *kind, char_u *extra, char_u *info, int cdir, int flags));
|
||||||
void set_completion __ARGS((int startcol, list_T *list));
|
void set_completion __ARGS((int startcol, list_T *list));
|
||||||
void ins_compl_show_pum __ARGS((void));
|
void ins_compl_show_pum __ARGS((void));
|
||||||
char_u *find_word_start __ARGS((char_u *ptr));
|
char_u *find_word_start __ARGS((char_u *ptr));
|
||||||
|
Reference in New Issue
Block a user