[patch] fixed bug: floating point numbers cannot be used as arguments in GVIM + lang

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[patch] fixed bug: floating point numbers cannot be used as arguments in GVIM + lang

Dominique Pellé
Nico wrote:

> After receiving several bug reports from users in one of my scripts, I
> came across this strange behavior. If GVim is being run in a different
> language, most functions cannot be called with floating point numbers
> as arguments. Here are the steps to reproduce:
>
> file: test.vim ----------------------------------
>
> function TestFloat(secret_number)
>    echo a:secret_number
> endfunction
>
> call TestFloat(3.14)
>
> -----------------------------------------------------
>
>> export LANG=de_DE.utf-8
>> gvim
>
> :source test.vim
>
> Produces:
>
> E806: using Float as String
> E116: Invalid arguments for function TestFloat

Attached patch fixes it for me.
Can you also check whether it works for you?

I wonder whether the same bug exists on Windows and other
OS or GUIs which I cannot test.

Cheers
-- Dominique

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

fixed-locale-bug-main.c-7.2.315.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [patch] fixed bug: floating point numbers cannot be used as arguments in GVIM + lang

Lech Lorens
2009/12/7 Dominique Pellé <[hidden email]>:
> Attached patch fixes it for me.
> Can you also check whether it works for you?
>
> I wonder whether the same bug exists on Windows and other
> OS or GUIs which I cannot test.

Your patch fixes the problem for me under the Athena GUI.

--
Cheers,
Lech

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: fixed bug: floating point numbers cannot be used as arguments in GVIM + lang

Cesar Romani-2
In reply to this post by Dominique Pellé
On Dec 7, 6:46 am, Dominique Pellé <[hidden email]> wrote:

> Nico wrote:
> > After receiving several bug reports from users in one of my scripts, I
> > came across this strange behavior. If GVim is being run in a different
> > language, most functions cannot be called with floating point numbers
> > as arguments. Here are the steps to reproduce:
>
> > file: test.vim ----------------------------------
>
> > function TestFloat(secret_number)
> >    echo a:secret_number
> > endfunction
>
> > call TestFloat(3.14)
>
> > -----------------------------------------------------
>
> >> export LANG=de_DE.utf-8
> >> gvim
>
> > :source test.vim
>
> > Produces:
>
> > E806: using Float as String
> > E116: Invalid arguments for function TestFloat
>
> Attached patch fixes it for me.
> Can you also check whether it works for you?
>
> I wonder whether the same bug exists on Windows and other
> OS or GUIs which I cannot test.

On Windows neither gvim nor vim have that bug

Regards,
Cesar

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: fixed bug: floating point numbers cannot be used as arguments in GVIM + lang

Tony Mechelynck
On 07/12/09 17:30, andalou wrote:

> On Dec 7, 6:46 am, Dominique Pellé<[hidden email]>  wrote:
>> Nico wrote:
>>> After receiving several bug reports from users in one of my scripts, I
>>> came across this strange behavior. If GVim is being run in a different
>>> language, most functions cannot be called with floating point numbers
>>> as arguments. Here are the steps to reproduce:
>>
>>> file: test.vim ----------------------------------
>>
>>> function TestFloat(secret_number)
>>>     echo a:secret_number
>>> endfunction
>>
>>> call TestFloat(3.14)
>>
>>> -----------------------------------------------------
>>
>>>> export LANG=de_DE.utf-8
>>>> gvim
>>
>>> :source test.vim
>>
>>> Produces:
>>
>>> E806: using Float as String
>>> E116: Invalid arguments for function TestFloat
>>
>> Attached patch fixes it for me.
>> Can you also check whether it works for you?
>>
>> I wonder whether the same bug exists on Windows and other
>> OS or GUIs which I cannot test.
>
> On Windows neither gvim nor vim have that bug
>
> Regards,
> Cesar
>

On Windows, instead of the "export" statement, you would have to set
your "country settings" (or whatever they are called) to Germany, so
that the menus come up in German. I don't know the relation between
Germany and floating-point rejection, but that's supposed to be part of
the recipe.


Best regards,
Tony.
--
Save energy: be apathetic.

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: fixed bug: floating point numbers cannot be used as arguments in GVIM + lang

Cesar Romani-2
On Dec 7, 6:38 pm, Tony Mechelynck <[hidden email]>
wrote:

> On 07/12/09 17:30, andalou wrote:
>
>
>
>
>
> > On Dec 7, 6:46 am, Dominique Pell <[hidden email]>  wrote:
> >> Nico wrote:
> >>> After receiving several bug reports from users in one of my scripts, I
> >>> came across this strange behavior. If GVim is being run in a different
> >>> language, most functions cannot be called with floating point numbers
> >>> as arguments. Here are the steps to reproduce:
>
> >>> file: test.vim ----------------------------------
>
> >>> function TestFloat(secret_number)
> >>>     echo a:secret_number
> >>> endfunction
>
> >>> call TestFloat(3.14)
>
> >>> -----------------------------------------------------
>
> >>>> export LANG=de_DE.utf-8
> >>>> gvim
>
> >>> :source test.vim
>
> >>> Produces:
>
> >>> E806: using Float as String
> >>> E116: Invalid arguments for function TestFloat
>
> >> Attached patch fixes it for me.
> >> Can you also check whether it works for you?
>
> >> I wonder whether the same bug exists on Windows and other
> >> OS or GUIs which I cannot test.
>
> > On Windows neither gvim nor vim have that bug
>
> > Regards,
> > Cesar
>
> On Windows, instead of the "export" statement, you would have to set
> your "country settings" (or whatever they are called) to Germany, so
> that the menus come up in German. I don't know the relation between
> Germany and floating-point rejection, but that's supposed to be part of
> the recipe.

Sorry for the misunderstanding.
I wanted to day that on Windows it works fine, both gvim and vim.

Regards,
Cesar

--
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
Reply | Threaded
Open this post in threaded view
|

Re: fixed bug: floating point numbers cannot be used as arguments in GVIM + lang

Nico-63
In reply to this post by Dominique Pellé
On Dec 7, 3:46 am, Dominique Pellé <[hidden email]> wrote:

> Nico wrote:
> > After receiving several bug reports from users in one of my scripts, I
> > came across this strange behavior. If GVim is being run in a different
> > language, most functions cannot be called with floating point numbers
> > as arguments. Here are the steps to reproduce:
>
> > file: test.vim ----------------------------------
>
> > function TestFloat(secret_number)
> >    echo a:secret_number
> > endfunction
>
> > call TestFloat(3.14)
>
> > -----------------------------------------------------
>
> >> export LANG=de_DE.utf-8
> >> gvim
>
> > :source test.vim
>
> > Produces:
>
> > E806: using Float as String
> > E116: Invalid arguments for function TestFloat
>
> Attached patch fixes it for me.
> Can you also check whether it works for you?
>
> I wonder whether the same bug exists on Windows and other
> OS or GUIs which I cannot test.

Your patch fixed it for me with the GTK.

Nico

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