mirror of
https://github.com/vim/vim.git
synced 2025-12-10 18:46:57 -05:00
patch 9.1.1946: Cannot open the help in the current window
Problem: Cannot open the help in the current window
Solution: Promote the example from tips.txt to a proper package and
include the helpcurwin package, add tests for it
(Peter Kenny)
closes: #18840
Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
397ad21268
commit
c0f2d2f140
@ -244,6 +244,7 @@ NEW_TESTS = \
|
||||
test_perl \
|
||||
test_plugin_comment \
|
||||
test_plugin_glvs \
|
||||
test_plugin_helpcurwin \
|
||||
test_plugin_helptoc \
|
||||
test_plugin_man \
|
||||
test_plugin_matchparen \
|
||||
@ -518,6 +519,7 @@ NEW_TESTS_RES = \
|
||||
test_perl.res \
|
||||
test_plugin_comment.res \
|
||||
test_plugin_glvs.res \
|
||||
test_plugin_helpcurwin.res \
|
||||
test_plugin_helptoc.res \
|
||||
test_plugin_man.res \
|
||||
test_plugin_matchparen.res \
|
||||
|
||||
13
src/testdir/test_plugin_helpcurwin.vim
Normal file
13
src/testdir/test_plugin_helpcurwin.vim
Normal file
@ -0,0 +1,13 @@
|
||||
" Test for the HelpCurwin package
|
||||
|
||||
func Test_helpcurwin_1()
|
||||
packadd helpcurwin
|
||||
call assert_equal(2, exists(':HelpCurwin'))
|
||||
new Xfoobar.txt
|
||||
only
|
||||
HelpCurwin tips.txt
|
||||
call assert_match('.*tips.txt', bufname('%'))
|
||||
call assert_equal(1, winnr('$'))
|
||||
call assert_true(bufexists('Xfoobar.txt'))
|
||||
%bw
|
||||
endfunc
|
||||
@ -729,6 +729,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1946,
|
||||
/**/
|
||||
1945,
|
||||
/**/
|
||||
|
||||
Reference in New Issue
Block a user