summaryrefslogtreecommitdiffstats
path: root/src/gui_gtk_x11.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2013-01-23 16:00:11 +0100
committerBram Moolenaar <Bram@vim.org>2013-01-23 16:00:11 +0100
commit3be71ce28d832553a1350b15d9323c30014382c0 (patch)
tree4c596e050fac44be028a72d5a69b00180229e5f4 /src/gui_gtk_x11.c
parent9d182dd0a666f7cb706cd54dd78df3f59a160fff (diff)
updated for version 7.3.777v7.3.777
Problem: When building with Gnome locale gets reset. Solution: Set locale after gnome_program_init(). (Christian Brabandt)
Diffstat (limited to 'src/gui_gtk_x11.c')
-rw-r--r--src/gui_gtk_x11.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c
index d70f418603..a8cad32e19 100644
--- a/src/gui_gtk_x11.c
+++ b/src/gui_gtk_x11.c
@@ -3130,8 +3130,16 @@ gui_mch_init(void)
* exits on failure, but that's a non-issue because we already called
* gtk_init_check() in gui_mch_init_check(). */
if (using_gnome)
+ {
gnome_program_init(VIMPACKAGE, VIM_VERSION_SHORT,
LIBGNOMEUI_MODULE, gui_argc, gui_argv, NULL);
+# if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
+ /* Make sure strtod() uses a decimal point, not a comma. Gnome init
+ * may change it. */
+ if (setlocale(LC_NUMERIC, NULL) != (char *) "C")
+ setlocale(LC_NUMERIC, "C");
+# endif
+ }
#endif
vim_free(gui_argv);
gui_argv = NULL;