Update runtime files.

This commit is contained in:
Bram Moolenaar
2018-07-21 05:56:22 +02:00
parent 872e451e8c
commit a9604e6145
30 changed files with 722 additions and 431 deletions

View File

@ -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:tutorfile . s:ext
" 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"