• R/O
  • SSH

vim: Commit

Mirror of the Vim source from https://github.com/vim/vim


Commit MetaInfo

Revisione1e24b1dba6e4152f1487c0ac47678cc80172620 (tree)
Time2020-09-25 06:15:04
AuthorBram Moolenaar <Bram@vim....>
CommiterBram Moolenaar

Log Message

patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point

Commit: https://github.com/vim/vim/commit/509f8031b2b347c033327ef33f3e5573a0595dbc
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Sep 24 23:08:19 2020 +0200

patch 8.2.1738: Mac: str2float() recognizes comma instead of decimal point
Problem: Mac: str2float() recognizes comma instead of decimal point.
Solution: Set LC_NUMERIC to "C". (closes https://github.com/vim/vim/issues/7003)

Change Summary

Incremental Difference

diff -r 61c93dd752ad -r e1e24b1dba6e src/os_mac_conv.c
--- a/src/os_mac_conv.c Thu Sep 24 23:00:05 2020 +0200
+++ b/src/os_mac_conv.c Thu Sep 24 23:15:04 2020 +0200
@@ -580,6 +580,10 @@
580580 # ifdef HAVE_LOCALE_H
581581 setlocale(LC_ALL, "");
582582 # endif
583+# if defined(FEAT_FLOAT) && defined(LC_NUMERIC)
584+ // Make sure strtod() uses a decimal point, not a comma.
585+ setlocale(LC_NUMERIC, "C");
586+# endif
583587 }
584588 }
585589 }
diff -r 61c93dd752ad -r e1e24b1dba6e src/version.c
--- a/src/version.c Thu Sep 24 23:00:05 2020 +0200
+++ b/src/version.c Thu Sep 24 23:15:04 2020 +0200
@@ -751,6 +751,8 @@
751751 static int included_patches[] =
752752 { /* Add new patch number below this line */
753753 /**/
754+ 1738,
755+/**/
754756 1737,
755757 /**/
756758 1736,
Show on old repository browser