diff runtime/tutor/tutor.vim @ 14372:2a4a2dc35c55

Update runtime files. commit https://github.com/vim/vim/commit/a9604e61451707b38fdcb088fbfaeea2b922fef6 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jul 21 05:56:22 2018 +0200 Update runtime files.
author Christian Brabandt <cb@256bit.org>
date Sat, 21 Jul 2018 06:00:09 +0200
parents a62eeee5f116
children 7688bff96a8c
line wrap: on
line diff
--- a/runtime/tutor/tutor.vim
+++ b/runtime/tutor/tutor.vim
@@ -59,7 +59,7 @@ if s:ext =~? '\.en'
   let s:ext = ""
 endif
 
-" The japanese tutor is available in two encodings, guess which one to use
+" The Japanese tutor is available in three encodings, guess which one to use
 " The "sjis" one is actually "cp932", it doesn't matter for this text.
 if s:ext =~? '\.ja'
   if &enc =~ "euc"
@@ -69,7 +69,7 @@ if s:ext =~? '\.ja'
   endif
 endif
 
-" The korean tutor is available in two encodings, guess which one to use
+" The Korean tutor is available in two encodings, guess which one to use
 if s:ext =~? '\.ko'
   if &enc != "utf-8"
     let s:ext = ".ko.euc"
@@ -169,15 +169,6 @@ if s:ext =~? '\.hr'
   endif
 endif
 
-" Esperanto is only available in utf-8
-if s:ext =~? '\.eo'
-  let s:ext = ".eo.utf-8"
-endif
-" Vietnamese is only available in utf-8
-if s:ext =~? '\.vi'
-  let s:ext = ".vi.utf-8"
-endif
-
 " If 'encoding' is utf-8 s:ext must end in utf-8.
 if &enc == 'utf-8' && s:ext !~ '\.utf-8'
   let s:ext .= '.utf-8'
@@ -190,6 +181,9 @@ let s:tutorxx = $VIMRUNTIME . s:tutorfil
 " 3. Finding the file:
 if filereadable(s:tutorxx)
   let $TUTOR = s:tutorxx
+elseif s:ext !~ '\.utf-8' && filereadable(s:tutorxx . ".utf-8")
+  " Fallback to utf-8 if available.
+  let $TUTOR = s:tutorxx . ".utf-8"
 else
   let $TUTOR = $VIMRUNTIME . s:tutorfile
   echo "The file " . s:tutorxx . " does not exist.\n"