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:
Peter Kenny
2025-12-02 20:42:53 +00:00
committed by Christian Brabandt
parent 397ad21268
commit c0f2d2f140
11 changed files with 169 additions and 27 deletions

View File

@ -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 \

View 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

View File

@ -729,6 +729,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1946,
/**/
1945,
/**/