aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-12 16:23:04 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-12-12 16:38:23 -0500
commitd5ab4b800c321d6cdd2cb308a9cdbaa3fa66cd8d (patch)
tree71ec536118f45db40fb2c0e2541a79edd170ebf9
parent7bbe8a4900fc2b25784a732ec414b0cfd0c20780 (diff)
downloadrneovim-d5ab4b800c321d6cdd2cb308a9cdbaa3fa66cd8d.tar.gz
rneovim-d5ab4b800c321d6cdd2cb308a9cdbaa3fa66cd8d.tar.bz2
rneovim-d5ab4b800c321d6cdd2cb308a9cdbaa3fa66cd8d.zip
vim-patch:8.1.1089: tutor does not check $LC_MESSAGES
Problem: Tutor does not check $LC_MESSAGES. Solution: Let $LC_MESSAGES overrule $LANG. (Miklos Vajna, closes vim/vim#4112) https://github.com/vim/vim/commit/b44b7add8ae8e15328b4f68c3caf511bd9aaac8c
-rw-r--r--runtime/autoload/tutor.vim6
1 files changed, 6 insertions, 0 deletions
diff --git a/runtime/autoload/tutor.vim b/runtime/autoload/tutor.vim
index 3265fdde36..6afe64de84 100644
--- a/runtime/autoload/tutor.vim
+++ b/runtime/autoload/tutor.vim
@@ -120,6 +120,12 @@ function! s:Locale()
let l:lang = v:lang
elseif $LC_ALL =~ '\a\a'
let l:lang = $LC_ALL
+ elseif $LC_MESSAGES =~ '\a\a' || $LC_MESSAGES ==# "C"
+ " LC_MESSAGES=C can be used to explicitly ask for English messages while
+ " keeping LANG non-English; don't set l:lang then.
+ if $LC_MESSAGES =~ '\a\a'
+ let l:lang = $LC_MESSAGES
+ endif
elseif $LANG =~ '\a\a'
let l:lang = $LANG
else