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
Index: main.c
===================================================================
RCS file: /cvsroot/vim/vim7/src/main.c,v
retrieving revision 1.96
diff -c -r1.96 main.c
*** main.c 17 Nov 2009 11:31:25 -0000 1.96
--- main.c 7 Dec 2009 11:34:06 -0000
***************
*** 366,379 ****
* Check if the GUI can be started. Reset gui.starting if not.
* Don't know about other systems, stay on the safe side and don't check.
*/
! if (gui.starting && gui_init_check() == FAIL)
{
! gui.starting = FALSE;
! /* When running "evim" or "gvim -y" we need the menus, exit if we
! * don't have them. */
! if (params.evim_mode)
! mch_exit(1);
}
# endif
#endif
--- 366,387 ----
* Check if the GUI can be started. Reset gui.starting if not.
* Don't know about other systems, stay on the safe side and don't check.
*/
! if (gui.starting)
{
! if (gui_init_check() == FAIL)
! {
! gui.starting = FALSE;
! /* When running "evim" or "gvim -y" we need the menus, exit if we
! * don't have them. */
! if (params.evim_mode)
! mch_exit(1);
! }
! # if defined(HAVE_LOCALE_H) || defined(X_LOCALE)
! /* Reinitialize locale which may have been altered
! * by gui_init_check() */
! init_locale();
! # endif
}
# endif
#endif
***************
*** 3685,3691 ****
}
else if (STRICMP(argv[i], "--servername") == 0)
{
! /* Alredy processed. Take it out of the command line */
i++;
continue;
}
--- 3693,3699 ----
}
else if (STRICMP(argv[i], "--servername") == 0)
{
! /* Already processed. Take it out of the command line */
i++;
continue;
}