Matt Tolton wrote: > Hi, > > I'm doing some work on MacVim and I've written a function (see below) > to programmatically evaluate an expression in vim and convert the > result to cocoa values. I'd like to be able to return information > about why the evaluation failed if it does. Can anyone give me tips > on how to get an error string or something?
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. Hope this helps, Ben. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---