1
0
forked from aniani/vim

patch 8.0.0026

Problem:    Error format with %W, %C and %Z does not work. (Gerd Wachsmuth)
Solution:   Skip code when qf_multiignore is set. (Lcd)
This commit is contained in:
Bram Moolenaar
2016-10-09 16:10:05 +02:00
parent 936c48f8ca
commit 9b45794818
3 changed files with 59 additions and 31 deletions

View File

@@ -1010,6 +1010,8 @@ restofline:
}
else if (vim_strchr((char_u *)"CZ", idx) != NULL)
{ /* continuation of multi-line msg */
if (!qi->qf_multiignore)
{
qfline_T *qfprev = qi->qf_lists[qi->qf_curlist].qf_last;
if (qfprev == NULL)
@@ -1043,6 +1045,7 @@ restofline:
? fields->namebuf
: qi->qf_currfile != NULL && fields->valid
? qi->qf_currfile : 0);
}
if (idx == 'Z')
qi->qf_multiline = qi->qf_multiignore = FALSE;
line_breakcheck();

View File

@@ -818,6 +818,29 @@ function! Test_efm_dirstack()
call delete('habits1.txt')
endfunction
" Test for resync after continuing an ignored message
function! Xefm_ignore_continuations(cchar)
call s:setup_commands(a:cchar)
let save_efm = &efm
let &efm =
\ '%Eerror %m %l,' .
\ '%-Wignored %m %l,' .
\ '%+Cmore ignored %m %l,' .
\ '%Zignored end'
Xgetexpr ['ignored warning 1', 'more ignored continuation 2', 'ignored end', 'error resync 4']
let l = map(g:Xgetlist(), '[v:val.text, v:val.valid, v:val.lnum, v:val.type]')
call assert_equal([['resync', 1, 4, 'E']], l)
let &efm = save_efm
endfunction
function! Test_efm_ignore_continuations()
call Xefm_ignore_continuations('c')
call Xefm_ignore_continuations('l')
endfunction
" Tests for invalid error format specifies
function Xinvalid_efm_Tests(cchar)
call s:setup_commands(a:cchar)

View File

@@ -764,6 +764,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
26,
/**/
25,
/**/