Hi Tatsuki, 2016-11-12(Sat) 16:49:47 UTC+9 Tatsuki: > When I set translated help(for example: set helplang=ja,en in .vimrc), open > translated help and press CTRL-], Vim opens help in translated help, but open > English help and press CTRL-], Vim opens translated help. > > I'd like vim to open same language help as current opened help. > > So, I fixed tag.c. > > > > You can view, comment on, or merge this pull request online at: > > https://github.com/vim/vim/pull/1249 > > Commit Summary > > an action help language CTRL-] in tag.c fixed > > > File Changes > > > M > src/tag.c > (29) > > > > Patch Links: > > https://github.com/vim/vim/pull/1249.patch > https://github.com/vim/vim/pull/1249.diff
Nice patch! It is indeed written in the document. :h helplang > When using CTRL-] and ":help!" in a non-English help file Vim will > try to find the tag in the current language before using this option. I wrote a patch to add a test for this. (Attached) Check it out. BTW, I found a bit wrong indentation. tag.c;1527+ /* Prefer help tags according to 'helplang'. Put the TAB SPC SPC SPC SPC TAB SPC SPC SPC SPC It should be: TAB TAB SPC SPC SPC SPC -- Best regards, Hirohito Higashi (a.k.a. h_east) -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
diff --git a/src/testdir/test_help_tagjump.vim b/src/testdir/test_help_tagjump.vim index 778bd9c..427d8db 100644 --- a/src/testdir/test_help_tagjump.vim +++ b/src/testdir/test_help_tagjump.vim @@ -150,4 +150,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