mirror of
https://github.com/neovim/neovim.git
synced 2025-09-06 19:38:20 +00:00
vim-patch:8.1.1363: ":vert options" #10048
Problem: ":vert options" does not make a vertical split.
Solution: Pass the right modifiers in $OPTWIN_CMD. (Ken Takata,
closes vim/vim#4401)
e0b5949a3b
This commit is contained in:

committed by
Justin M. Keyes

parent
62d5137c83
commit
55fa966a92
@@ -2826,6 +2826,9 @@ void ex_packadd(exarg_T *eap)
|
||||
void ex_options(exarg_T *eap)
|
||||
{
|
||||
vim_setenv("OPTWIN_CMD", cmdmod.tab ? "tab" : "");
|
||||
vim_setenv("OPTWIN_CMD",
|
||||
cmdmod.tab ? "tab" :
|
||||
(cmdmod.split & WSP_VERT) ? "vert" : "");
|
||||
cmd_source((char_u *)SYS_OPTWIN_FILE, NULL);
|
||||
}
|
||||
|
||||
|
@@ -51,6 +51,32 @@ function! 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
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user