Mercurial > vim
diff src/quickfix.c @ 28451:e015d650ea9f v8.2.4750
patch 8.2.4750: small pieces of dead code
Commit: https://github.com/vim/vim/commit/b836658a04ee5456deca2ee523de9efe51252da3
Author: =?UTF-8?q?Dundar=20G=C3=B6c?= <gocdundar@gmail.com>
Date: Thu Apr 14 20:43:56 2022 +0100
patch 8.2.4750: small pieces of dead code
Problem: Small pieces of dead code.
Solution: Remove the dead code. (Goc Dundar, closes https://github.com/vim/vim/issues/10190) Rename the
qftf_cb struct member to avoid confusion.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 14 Apr 2022 21:45:02 +0200 |
parents | 62cc3b60493b |
children | 4dcccb2673fe |
line wrap: on
line diff
--- a/src/quickfix.c +++ b/src/quickfix.c @@ -85,7 +85,7 @@ typedef struct qf_list_S char_u *qf_title; // title derived from the command that created // the error list or set by setqflist 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; char_u *qf_directory; @@ -2337,10 +2337,10 @@ copy_loclist(qf_list_T *from_qfl, qf_lis } else to_qfl->qf_ctx = NULL; - if (from_qfl->qftf_cb.cb_name != NULL) - copy_callback(&to_qfl->qftf_cb, &from_qfl->qftf_cb); + if (from_qfl->qf_qftf_cb.cb_name != NULL) + copy_callback(&to_qfl->qf_qftf_cb, &from_qfl->qf_qftf_cb); else - to_qfl->qftf_cb.cb_name = NULL; + to_qfl->qf_qftf_cb.cb_name = NULL; if (from_qfl->qf_count) if (copy_loclist_entries(from_qfl, to_qfl) == FAIL) @@ -3938,7 +3938,7 @@ qf_free(qf_list_T *qfl) VIM_CLEAR(qfl->qf_title); free_tv(qfl->qf_ctx); qfl->qf_ctx = NULL; - free_callback(&qfl->qftf_cb); + free_callback(&qfl->qf_qftf_cb); qfl->qf_id = 0; qfl->qf_changedtick = 0L; } @@ -4660,9 +4660,9 @@ call_qftf_func(qf_list_T *qfl, int qf_wi // 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 // set. - if (qfl->qftf_cb.cb_name != NULL) - cb = &qfl->qftf_cb; - if (cb != NULL && cb->cb_name != NULL) + if (qfl->qf_qftf_cb.cb_name != NULL) + cb = &qfl->qf_qftf_cb; + if (cb->cb_name != NULL) { typval_T args[1]; dict_T *d; @@ -7105,11 +7105,11 @@ qf_getprop_qftf(qf_list_T *qfl, dict_T * { int status; - if (qfl->qftf_cb.cb_name != NULL) + if (qfl->qf_qftf_cb.cb_name != NULL) { typval_T tv; - put_callback(&qfl->qftf_cb, &tv); + put_callback(&qfl->qf_qftf_cb, &tv); status = dict_add_tv(retdict, "quickfixtextfunc", &tv); clear_tv(&tv); } @@ -7551,10 +7551,10 @@ qf_setprop_qftf(qf_info_T *qi UNUSED, qf { callback_T cb; - free_callback(&qfl->qftf_cb); + free_callback(&qfl->qf_qftf_cb); cb = get_callback(&di->di_tv); if (cb.cb_name != NULL && *cb.cb_name != NUL) - set_callback(&qfl->qftf_cb, &cb); + set_callback(&qfl->qf_qftf_cb, &cb); return OK; } @@ -7737,7 +7737,7 @@ mark_quickfix_ctx(qf_info_T *qi, int cop && ctx->v_type != VAR_STRING && ctx->v_type != VAR_FLOAT) 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); }