From d5ab4b800c321d6cdd2cb308a9cdbaa3fa66cd8d Mon Sep 17 00:00:00 2001 From: Jan Edmund Lazo Date: Sat, 12 Dec 2020 16:23:04 -0500 Subject: [PATCH] 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 --- runtime/autoload/tutor.vim | 6 ++++++ 1 file changed, 6 insertions(+) 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