Kim Schulz wrote:

> I get gvim to crash every time I try the following:
> 
> let mynumbers = {0:'zero',1:'one',2:'two',3:'three',4:'four',
>               5:'five',6:'six',7:'seven',8:'eight',9:'nine'}
> function mynumbers.convert(number) dict
>    return join(map(split(a:number,'\zs'), 'get(self,
> v:val,"unknown")')) 
> endfunction
> 
> echo mynumbers.convert(12345)
> 
> cannot get the same code to crash in the console version of vim.
> 

I can't reproduce the crash.  Anything specific about the Vim you are
using?

It's weird that it crashes only in the GUI version, there is nothing
GUI-specific being used.

Perhaps you can have Vim crash in a debugger and find out where it
happens?

> another weird thing is that if I call this function (in console vim)
> and uses the argument 123123123123 then it returns as if approx. half
> of the digits are unknown. is it Vim's number<->string conversion
> mechanism that fails or? 

Size of numbers is limited to 32 bits.

-- 
A consultant is a person who takes your money and annoys your employees while
tirelessly searching for the best way to extend the consulting contract.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

Reply via email to