Bug#582421: [Patch] Floating point is broken if :lang is called in gvim
James Vega
vega.james at gmail.com
Thu May 20 18:18:23 UTC 2010
Bram,
If the locale is changed in gvim via ":lang" to a locale which uses
comma for the decimal separator, then floating point numbers are no
longer usable. This only happens with the ":lang $locale" variant,
since that sets $LANG before calling gtk_set_locale().
env LANG=C gvim
:lang es_ES.UTF-8
:lang messages C " so errors are in English
:echo ceil(1.2)
E806: using Float as a String
E116: Invalid arguments for function ceil(1.2)
E15: Invalid expression: ceil(1.2)
:echo str2float('1.2')
1,0
:echo str2float('1,2')
1,2
Attached patch fixes the issue by ensuring $LC_NUMERIC is set to C if
the LC_ALL version of :lang is called.
--
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: float.diff
Type: application/octet-stream
Size: 614 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20100520/54417c70/attachment.obj>
More information about the pkg-vim-maintainers
mailing list