diff options
author | James McCoy <jamessan@jamessan.com> | 2017-12-07 20:53:02 -0500 |
---|---|---|
committer | James McCoy <jamessan@jamessan.com> | 2017-12-10 07:45:04 -0500 |
commit | 1f2b35860f755513a58c1d010f082d946c889b47 (patch) | |
tree | 90b236c1244a29ff4d407fb6e2bc47fa7929e254 /src/nvim/option.c | |
parent | 4a5bc6275d09056ff0ccf5a29a878d48bbe58655 (diff) | |
download | rneovim-1f2b35860f755513a58c1d010f082d946c889b47.tar.gz rneovim-1f2b35860f755513a58c1d010f082d946c889b47.tar.bz2 rneovim-1f2b35860f755513a58c1d010f082d946c889b47.zip |
mac: Set $LANG based on the system locale
Unix's typical locale-related environment variables aren't always set
appropriately on a Mac. Instead of relying on them, query the locale
information using Mac specific APIs and then set $LANG appropriately for
the rest of nvim.
Closes #5873
Diffstat (limited to 'src/nvim/option.c')
-rw-r--r-- | src/nvim/option.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nvim/option.c b/src/nvim/option.c index 37c4233142..f8a05f133d 100644 --- a/src/nvim/option.c +++ b/src/nvim/option.c @@ -75,6 +75,7 @@ #include "nvim/window.h" #include "nvim/os/os.h" #include "nvim/os/input.h" +#include "nvim/os/lang.h" /* * The options that are local to a window or buffer have "indir" set to one of @@ -784,6 +785,8 @@ void set_init_1(void) didset_options2(); + lang_init(); + // enc_locale() will try to find the encoding of the current locale. // This will be used when 'default' is used as encoding specifier // in 'fileencodings' |