Mercurial > vim
diff src/testdir/test_help_tagjump.vim @ 10444:2edda415c28a v8.0.0116
commit https://github.com/vim/vim/commit/6dbf66aa3e2197ce41f2b1cc7602bb9c15840548
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Dec 1 21:32:32 2016 +0100
patch 8.0.0116
Problem: When reading English help and using CTRl-] the language from
'helplang' is used.
Solution: Make help tag jumps keep the language. (Tatsuki, test by Hirohito
Higashi, closes #1249)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 01 Dec 2016 21:45:04 +0100 |
parents | 1de5916d9403 |
children | 260100346566 |
line wrap: on
line diff
--- a/src/testdir/test_help_tagjump.vim +++ b/src/testdir/test_help_tagjump.vim @@ -141,4 +141,36 @@ func Test_help_complete() endtry endfunc +func Test_help_respect_current_file_lang() + try + let list = [] + call s:doc_config_setup() + + if has('multi_lang') + function s:check_help_file_ext(help_keyword, ext) + exec 'help ' . a:help_keyword + call assert_equal(a:ext, expand('%:e')) + call feedkeys("\<C-]>", 'tx') + call assert_equal(a:ext, expand('%:e')) + pop + helpclose + endfunc + + set rtp+=Xdir1/doc-ab + set rtp+=Xdir1/doc-ja + + set helplang=ab + call s:check_help_file_ext('test-char', 'abx') + call s:check_help_file_ext('test-char@ja', 'jax') + set helplang=ab,ja + call s:check_help_file_ext('test-char@ja', 'jax') + call s:check_help_file_ext('test-char@en', 'txt') + endif + catch + call assert_exception('X') + finally + call s:doc_config_teardown() + endtry +endfunc + " vim: shiftwidth=2 sts=2 expandtab