vim-patch:8.0.1844: superfluous quickfix code, missing examples

Problem:    Superfluous quickfix code, missing examples.
Solution:   Remove unneeded code.  Add a few examples.  Add a bit more
            testing. (Yegappan Lakshmanan, closes vim/vim#2916)
78ddc06bdd
This commit is contained in:
Jan Edmund Lazo
2019-09-04 02:03:45 -04:00
parent 7876f4f218
commit 9d50d033bc
2 changed files with 7 additions and 7 deletions

View File

@@ -5066,13 +5066,6 @@ static int qf_setprop_items(qf_info_T *qi, int qf_idx, dictitem_T *di,
const int retval = qf_add_entries(qi, qf_idx, di->di_tv.vval.v_list,
title_save,
action == ' ' ? 'a' : action);
if (action == 'r') {
// When replacing the quickfix list entries using
// qf_add_entries(), the title is set with a ':' prefix.
// Restore the title with the saved title.
xfree(qi->qf_lists[qf_idx].qf_title);
qi->qf_lists[qf_idx].qf_title = vim_strsave(title_save);
}
xfree(title_save);
return retval;

View File

@@ -1167,6 +1167,13 @@ func Test_efm2()
call assert_equal(1, len(l), string(l))
call assert_equal('|| msg2', l[0].text)
" When matching error lines, case should be ignored. Test for this.
set noignorecase
let l=getqflist({'lines' : ['Xtest:FOO10:Line 20'], 'efm':'%f:foo%l:%m'})
call assert_equal(10, l.items[0].lnum)
call assert_equal('Line 20', l.items[0].text)
set ignorecase&
new | only
let &efm = save_efm
endfunc