On Jul 21, 11:47 am, Ben Fritz <[email protected]> wrote:
> I just found :help :return...I think that's what the OP wants.
I need to stop trying to multitask before I make myself look like more
of an idiot.
Obviously you are already using :return to get a value from the
function.
What I meant is, simply return some flag value in the case of an
error. As-is, the function (implicitly) returns 0 in the last error
case (which I found in :help :return). Zero evaluates as false and a
non-empty string evaluates as true, so just check the value before you
use it.
You'll need an additional "return 0" within your catch, but the rest
of the function should "just work".
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---