Mercurial > vim
changeset 31437:ede2bd5f3426 v9.0.1051
patch 9.0.1051: after a failed CTRL-W ] next command splits window
Commit: https://github.com/vim/vim/commit/cb94c910706fdd575cc25797d7858e084f1e3524
Author: Rob Pilling <robpilling@gmail.com>
Date: Tue Dec 13 12:26:09 2022 +0000
patch 9.0.1051: after a failed CTRL-W ] next command splits window
Problem: After a failed CTRL-W ] next command splits window.
Solution: Reset postponed_split. (Rob Pilling, closes https://github.com/vim/vim/issues/11698)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 13 Dec 2022 13:30:04 +0100 |
parents | 8e20602d3d90 |
children | 93e9fb4728a8 |
files | src/testdir/test_window_cmd.vim src/version.c src/window.c |
diffstat | 3 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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-@\<CR>" + silent! execute "normal! \<C-W>]" + + let wincount = winnr('$') + help 'mod' + + call assert_equal(wincount, winnr('$')) + call assert_equal(expand("<cword>"), "'mod'") +endfunction + + " vim: shiftwidth=2 sts=2 expandtab
--- a/src/version.c +++ b/src/version.c @@ -696,6 +696,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1051, +/**/ 1050, /**/ 1049,
--- 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