Ben Schmidt wrote: > Bram Moolenaar wrote: >> Ben Schmidt wrote: >> >>> Another oddity I've recently discovered is that str2nr won't accept an >>> explicitly positive number, such as '+3'. >>> >>> This is unexpected. Would you be willing to adjust the behaviour? I >>> can't think of any negative/compatibility-breaking side effects this >>> would have, but I also don't know where the vim_str2nr function is used. >>> >>> The attached patch does the job. >> vim_str2nr() is used in many places, I can't quickly see the impact of >> this change. What user facing issue are you trying to solve? If it's >> about str2nr() itself then it's better solved in f_str2nr(). > > Yes, it is about str2nr() itself. Very happy to have it solved there. > > The problem I was facing this time was passing the exponent part of > output from printf, which always has the form +\d\+
or [+-]\d\+ even. Duh. Ben. --~--~---------~--~----~------------~-------~--~----~ You received this message from the "vim_dev" maillist. For more information, visit http://www.vim.org/maillist.php -~----------~----~----~----~------~----~------~--~---