forked from aniani/vim
patch 8.2.4750: small pieces of dead code
Problem: Small pieces of dead code. Solution: Remove the dead code. (Goc Dundar, closes #10190) Rename the qftf_cb struct member to avoid confusion.
This commit is contained in:
parent
eca7c60d68
commit
b836658a04
@ -4960,8 +4960,7 @@ ex_global(exarg_T *eap)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
delim = *cmd; // get the delimiter
|
delim = *cmd; // get the delimiter
|
||||||
if (delim)
|
++cmd; // skip delimiter if there is one
|
||||||
++cmd; // skip delimiter if there is one
|
|
||||||
pat = cmd; // remember start of pattern
|
pat = cmd; // remember start of pattern
|
||||||
cmd = skip_regexp_ex(cmd, delim, magic_isset(), &eap->arg, NULL, NULL);
|
cmd = skip_regexp_ex(cmd, delim, magic_isset(), &eap->arg, NULL, NULL);
|
||||||
if (cmd[0] == delim) // end delimiter found
|
if (cmd[0] == delim) // end delimiter found
|
||||||
|
@ -1576,7 +1576,7 @@ expand_env_esc(
|
|||||||
c = (int)STRLEN(var);
|
c = (int)STRLEN(var);
|
||||||
// if var[] ends in a path separator and tail[] starts
|
// if var[] ends in a path separator and tail[] starts
|
||||||
// with it, skip a character
|
// with it, skip a character
|
||||||
if (*var != NUL && after_pathsep(dst, dst + c)
|
if (after_pathsep(dst, dst + c)
|
||||||
#if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA)
|
#if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA)
|
||||||
&& dst[-1] != ':'
|
&& dst[-1] != ':'
|
||||||
#endif
|
#endif
|
||||||
|
@ -1249,8 +1249,7 @@ ambw_end:
|
|||||||
int x2 = -1;
|
int x2 = -1;
|
||||||
int x3 = -1;
|
int x3 = -1;
|
||||||
|
|
||||||
if (*p != NUL)
|
p += mb_ptr2len(p);
|
||||||
p += mb_ptr2len(p);
|
|
||||||
if (*p != NUL)
|
if (*p != NUL)
|
||||||
x2 = *p++;
|
x2 = *p++;
|
||||||
if (*p != NUL)
|
if (*p != NUL)
|
||||||
|
@ -85,7 +85,7 @@ typedef struct qf_list_S
|
|||||||
char_u *qf_title; // title derived from the command that created
|
char_u *qf_title; // title derived from the command that created
|
||||||
// the error list or set by setqflist
|
// the error list or set by setqflist
|
||||||
typval_T *qf_ctx; // context set by setqflist/setloclist
|
typval_T *qf_ctx; // context set by setqflist/setloclist
|
||||||
callback_T qftf_cb; // 'quickfixtextfunc' callback function
|
callback_T qf_qftf_cb; // 'quickfixtextfunc' callback function
|
||||||
|
|
||||||
struct dir_stack_T *qf_dir_stack;
|
struct dir_stack_T *qf_dir_stack;
|
||||||
char_u *qf_directory;
|
char_u *qf_directory;
|
||||||
@ -2337,10 +2337,10 @@ copy_loclist(qf_list_T *from_qfl, qf_list_T *to_qfl)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
to_qfl->qf_ctx = NULL;
|
to_qfl->qf_ctx = NULL;
|
||||||
if (from_qfl->qftf_cb.cb_name != NULL)
|
if (from_qfl->qf_qftf_cb.cb_name != NULL)
|
||||||
copy_callback(&to_qfl->qftf_cb, &from_qfl->qftf_cb);
|
copy_callback(&to_qfl->qf_qftf_cb, &from_qfl->qf_qftf_cb);
|
||||||
else
|
else
|
||||||
to_qfl->qftf_cb.cb_name = NULL;
|
to_qfl->qf_qftf_cb.cb_name = NULL;
|
||||||
|
|
||||||
if (from_qfl->qf_count)
|
if (from_qfl->qf_count)
|
||||||
if (copy_loclist_entries(from_qfl, to_qfl) == FAIL)
|
if (copy_loclist_entries(from_qfl, to_qfl) == FAIL)
|
||||||
@ -3938,7 +3938,7 @@ qf_free(qf_list_T *qfl)
|
|||||||
VIM_CLEAR(qfl->qf_title);
|
VIM_CLEAR(qfl->qf_title);
|
||||||
free_tv(qfl->qf_ctx);
|
free_tv(qfl->qf_ctx);
|
||||||
qfl->qf_ctx = NULL;
|
qfl->qf_ctx = NULL;
|
||||||
free_callback(&qfl->qftf_cb);
|
free_callback(&qfl->qf_qftf_cb);
|
||||||
qfl->qf_id = 0;
|
qfl->qf_id = 0;
|
||||||
qfl->qf_changedtick = 0L;
|
qfl->qf_changedtick = 0L;
|
||||||
}
|
}
|
||||||
@ -4660,9 +4660,9 @@ call_qftf_func(qf_list_T *qfl, int qf_winid, long start_idx, long end_idx)
|
|||||||
// If 'quickfixtextfunc' is set, then use the user-supplied function to get
|
// If 'quickfixtextfunc' is set, then use the user-supplied function to get
|
||||||
// the text to display. Use the local value of 'quickfixtextfunc' if it is
|
// the text to display. Use the local value of 'quickfixtextfunc' if it is
|
||||||
// set.
|
// set.
|
||||||
if (qfl->qftf_cb.cb_name != NULL)
|
if (qfl->qf_qftf_cb.cb_name != NULL)
|
||||||
cb = &qfl->qftf_cb;
|
cb = &qfl->qf_qftf_cb;
|
||||||
if (cb != NULL && cb->cb_name != NULL)
|
if (cb->cb_name != NULL)
|
||||||
{
|
{
|
||||||
typval_T args[1];
|
typval_T args[1];
|
||||||
dict_T *d;
|
dict_T *d;
|
||||||
@ -7105,11 +7105,11 @@ qf_getprop_qftf(qf_list_T *qfl, dict_T *retdict)
|
|||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (qfl->qftf_cb.cb_name != NULL)
|
if (qfl->qf_qftf_cb.cb_name != NULL)
|
||||||
{
|
{
|
||||||
typval_T tv;
|
typval_T tv;
|
||||||
|
|
||||||
put_callback(&qfl->qftf_cb, &tv);
|
put_callback(&qfl->qf_qftf_cb, &tv);
|
||||||
status = dict_add_tv(retdict, "quickfixtextfunc", &tv);
|
status = dict_add_tv(retdict, "quickfixtextfunc", &tv);
|
||||||
clear_tv(&tv);
|
clear_tv(&tv);
|
||||||
}
|
}
|
||||||
@ -7551,10 +7551,10 @@ qf_setprop_qftf(qf_info_T *qi UNUSED, qf_list_T *qfl, dictitem_T *di)
|
|||||||
{
|
{
|
||||||
callback_T cb;
|
callback_T cb;
|
||||||
|
|
||||||
free_callback(&qfl->qftf_cb);
|
free_callback(&qfl->qf_qftf_cb);
|
||||||
cb = get_callback(&di->di_tv);
|
cb = get_callback(&di->di_tv);
|
||||||
if (cb.cb_name != NULL && *cb.cb_name != NUL)
|
if (cb.cb_name != NULL && *cb.cb_name != NUL)
|
||||||
set_callback(&qfl->qftf_cb, &cb);
|
set_callback(&qfl->qf_qftf_cb, &cb);
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
@ -7737,7 +7737,7 @@ mark_quickfix_ctx(qf_info_T *qi, int copyID)
|
|||||||
&& ctx->v_type != VAR_STRING && ctx->v_type != VAR_FLOAT)
|
&& ctx->v_type != VAR_STRING && ctx->v_type != VAR_FLOAT)
|
||||||
abort = abort || set_ref_in_item(ctx, copyID, NULL, NULL);
|
abort = abort || set_ref_in_item(ctx, copyID, NULL, NULL);
|
||||||
|
|
||||||
cb = &qi->qf_lists[i].qftf_cb;
|
cb = &qi->qf_lists[i].qf_qftf_cb;
|
||||||
abort = abort || set_ref_in_callback(cb, copyID);
|
abort = abort || set_ref_in_callback(cb, copyID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -746,6 +746,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4750,
|
||||||
/**/
|
/**/
|
||||||
4749,
|
4749,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user