Matt Tolton wrote:
>> I suppose that when eval_expr returns NULL, you should look up the most
>> recent message that :messages would return. So, check out the function
>> ex_messages().
>>
>> I guess you'll also want to make sure that emsg_not_now() is false, so
>> that the messages are actually recorded, but that emsg_silent is true so
>> that it's not displayed. Check out the emsg() function.
> 
> Hm, ok.  I think I see how to do this.  However, won't that mean that
> the messages will be visible in the :messages command to the user?  It
> would be nice to avoid that.  Is there no way to trap the messages
> before they go into the message history?

Hmm. Yes. Looking at it, though, the error message is simply:

E15: Invalid expression: {expr}

Where {expr} is the expression the user gave. See the e_invexpr2 array in 
globals.h. I guess using it a similar way to eval0() does would ensure it is 
localisable.

But I guess there's not much point to looking up the message. You can just form 
the same yourself easily enough, and thus avoid logging it, etc..

Ben.



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui