vim-patch:8.2.0577: not all modifiers supported for :options (#18952)

Problem:    Not all modifiers supported for :options.
Solution:   Use all cmdmod.split flags. (closes vim/vim#4401)
7a1637f4c0

Cherry-pick Test_options_command() change from patch 8.2.0540
This commit is contained in:
zeertzjq
2022-06-13 22:04:39 +08:00
committed by GitHub
parent 837360868b
commit e13c36e312
4 changed files with 109 additions and 42 deletions

View File

@@ -1637,10 +1637,13 @@ void ex_compiler(exarg_T *eap)
/// ":options"
void ex_options(exarg_T *eap)
{
os_setenv("OPTWIN_CMD", cmdmod.tab ? "tab" : "", 1);
os_setenv("OPTWIN_CMD",
cmdmod.tab ? "tab" :
(cmdmod.split & WSP_VERT) ? "vert" : "", 1);
char buf[500];
bool multi_mods = 0;
buf[0] = NUL;
(void)add_win_cmd_modifers(buf, &multi_mods);
os_setenv("OPTWIN_CMD", buf, 1);
cmd_source(SYS_OPTWIN_FILE, NULL);
}