mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.1.1363: ":vert options" does not make a vertical split
Problem: ":vert options" does not make a vertical split. Solution: Pass the right modifiers in $OPTWIN_CMD. (Ken Takata, closes #4401)
This commit is contained in:
parent
c79745a82f
commit
e0b5949a3b
@ -3016,7 +3016,9 @@ ex_packadd(exarg_T *eap)
|
|||||||
ex_options(
|
ex_options(
|
||||||
exarg_T *eap UNUSED)
|
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);
|
cmd_source((char_u *)SYS_OPTWIN_FILE, NULL);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -51,6 +51,32 @@ func Test_options()
|
|||||||
endtry
|
endtry
|
||||||
call assert_equal('ok', caught)
|
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 option-window
|
||||||
close
|
close
|
||||||
endfunc
|
endfunc
|
||||||
|
@ -767,6 +767,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1363,
|
||||||
/**/
|
/**/
|
||||||
1362,
|
1362,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user