Lcd wrote:
> On 8 October 2016, Bram Moolenaar <[email protected]> wrote:
> >
> > > Lcd wrote:
> > >
> > > On 7 October 2016, Gerd Wachsmuth <[email protected]> wrote:
> > > > > The issue is that the multiline error is started by %W and ends with
> > > > > %Z without adding any errors.
> > > > In my opinion, it is not the issue that no `%C` is present:
> > > > With
> > > >
> > > > set efm=%+Eerror\ %l,%-Winfo\ %m\ %l,%+Ceven\ more\ %m,%Zmore\ info
> > > > (note the `%C` line)
> > > > and the errorfile
> > > > ````
> > > > info bla 3
> > > > even more info
> > > > more info
> > > > error 2
> > > > ````
> > > > we do not see `error 2` in the quickfix window.
> > >
> > > What seems to be going on here is that the first line gets matched
> > > as `%-W` and `qf_parse_line()` returns `QF_IGNORE_LINE`. Then the
> > > second line gets matched as `%+C`, it sets `%m`, but then it can't
> > > find a previous line to continue since the previous line was ignored.
> > > Consequently `qf_parse_line()` returns `QF_FAIL`, and `qf_init_ext()`
> > > bails out at that point, silently ignoring any remaining input.
> > >
> > > Possible solution:
> > >
> > > ```diff
> > > diff --git a/src/quickfix.c b/src/quickfix.c
> > > index 52abbeb..9139663 100644
> > > --- a/src/quickfix.c
> > > +++ b/src/quickfix.c
> > > @@ -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();
> > > ```
> >
> > Could you write a test that covers this?
>
> Done:
>
> https://gist.github.com/lcd047/4d4adb7e77fe29d9a8313c27fd42db25
>
> (the diff is a lot bigger because of re-indentation).
Thanks. I find it a bit hard to describe the problem and the fix.
Well, let's just keep it high level.
--
TALL KNIGHT: When you have found the shrubbery, then you must cut down the
mightiest tree in the forest ... with a herring.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.