diff --git a/src/testdir/test_window_cmd.vim b/src/testdir/test_window_cmd.vim index 0a4ae493e..3e841891f 100644 --- a/src/testdir/test_window_cmd.vim +++ b/src/testdir/test_window_cmd.vim @@ -1911,4 +1911,17 @@ function Test_splitkeep_status() call VerifyScreenDump(buf, 'Test_splitkeep_status_1', {}) endfunction +function Test_new_help_window_on_error() + help change.txt + execute "normal! /CTRL-@\" + silent! execute "normal! \]" + + let wincount = winnr('$') + help 'mod' + + call assert_equal(wincount, winnr('$')) + call assert_equal(expand(""), "'mod'") +endfunction + + " vim: shiftwidth=2 sts=2 expandtab diff --git a/src/version.c b/src/version.c index f72d53796..5248bcf50 100644 --- a/src/version.c +++ b/src/version.c @@ -695,6 +695,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 1051, /**/ 1050, /**/ diff --git a/src/window.c b/src/window.c index 62b2a3f6f..51745d271 100644 --- a/src/window.c +++ b/src/window.c @@ -559,6 +559,7 @@ newwindow: // Execute the command right here, required when "wincmd ]" // was used in a function. do_nv_ident(Ctrl_RSB, NUL); + postponed_split = 0; break; // edit file name under cursor in a new window @@ -674,6 +675,7 @@ wingotofile: // Execute the command right here, required when // "wincmd g}" was used in a function. do_nv_ident('g', xchar); + postponed_split = 0; break; case 'f': // CTRL-W gf: "gf" in a new tab page