Hi Nicola!
On Do, 15 Okt 2015, Nicola wrote:
> On 2015-10-15 14:54:17 +0000, Gary Johnson said:
>
> >To solve the particular problem of setting 'errorformat' without
> >disturbing the global setting, you could either set the value for
> >just the current buffer like this:
> >
> > setlocal errorformat=%f:%l:%m
>
> I have tried that, but cexpr (and lexpr, too!) uses the global value of
> errorformat.
Sounds like a bug to me. Does this patch fix it?
diff --git a/src/quickfix.c b/src/quickfix.c
--- a/src/quickfix.c
+++ b/src/quickfix.c
@@ -4230,7 +4230,9 @@ ex_cexpr(eap)
if ((tv->v_type == VAR_STRING && tv->vval.v_string != NULL)
|| (tv->v_type == VAR_LIST && tv->vval.v_list != NULL))
{
- if (qf_init_ext(qi, NULL, NULL, tv, p_efm,
+ char_u *efm = *curwin->w_buffer->b_p_efm == NUL ? p_efm :
+ curwin->w_buffer->b_p_efm;
+ if (qf_init_ext(qi, NULL, NULL, tv, efm,
(eap->cmdidx != CMD_caddexpr
&& eap->cmdidx != CMD_laddexpr),
(linenr_T)0, (linenr_T)0, *eap->cmdlinep) > 0
Best,
Christian
--
Aus Fehlern lernt man. Politiker machen keine Fehler.
--
--
You received this message from the "vim_use" 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_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment