diff options
author | Bram Moolenaar <Bram@vim.org> | 2019-05-21 20:54:45 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2019-05-21 20:54:45 +0200 |
commit | e0b5949a3b28be9940bb8a46b2579e960100b83b (patch) | |
tree | be7ed16a7c64bda948727fc252ee67324cbd1f28 | |
parent | c79745a82faeb5a6058e915ca49a4c69fa60ea01 (diff) | |
download | vim-git-e0b5949a3b28be9940bb8a46b2579e960100b83b.tar.gz |
patch 8.1.1363: ":vert options" does not make a vertical splitv8.1.1363
Problem: ":vert options" does not make a vertical split.
Solution: Pass the right modifiers in $OPTWIN_CMD. (Ken Takata,
closes #4401)
-rw-r--r-- | src/ex_cmds2.c | 4 | ||||
-rw-r--r-- | src/testdir/test_options.vim | 26 | ||||
-rw-r--r-- | src/version.c | 2 |
3 files changed, 31 insertions, 1 deletions
diff --git a/src/ex_cmds2.c b/src/ex_cmds2.c index 18c438ce0..bf6e55120 100644 --- a/src/ex_cmds2.c +++ b/src/ex_cmds2.c @@ -3016,7 +3016,9 @@ ex_packadd(exarg_T *eap) ex_options( exarg_T *eap UNUSED) { - vim_setenv((char_u *)"OPTWIN_CMD", (char_u *)(cmdmod.tab ? "tab" : "")); + vim_setenv((char_u *)"OPTWIN_CMD", + (char_u *)(cmdmod.tab ? "tab" + : (cmdmod.split & WSP_VERT) ? "vert" : "")); cmd_source((char_u *)SYS_OPTWIN_FILE, NULL); } #endif diff --git a/src/testdir/test_options.vim b/src/testdir/test_options.vim index c5dbb9f4c..13de71934 100644 --- a/src/testdir/test_options.vim +++ b/src/testdir/test_options.vim @@ -51,6 +51,32 @@ func Test_options() endtry call assert_equal('ok', caught) + " Check if the option-window is opened horizontally. + wincmd j + call assert_notequal('option-window', bufname('')) + wincmd k + call assert_equal('option-window', bufname('')) + " close option-window + close + + " Open the option-window vertically. + vert options + " Check if the option-window is opened vertically. + wincmd l + call assert_notequal('option-window', bufname('')) + wincmd h + call assert_equal('option-window', bufname('')) + " close option-window + close + + " Open the option-window in a new tab. + tab options + " Check if the option-window is opened in a tab. + normal gT + call assert_notequal('option-window', bufname('')) + normal gt + call assert_equal('option-window', bufname('')) + " close option-window close endfunc diff --git a/src/version.c b/src/version.c index cdcd132e4..fb7dad390 100644 --- a/src/version.c +++ b/src/version.c @@ -768,6 +768,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 1363, +/**/ 1362, /**/ 1361, |