diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-06-13 22:04:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 22:04:39 +0800 |
commit | e13c36e312a9128f5c2ffd5a444939efc43bc0b5 (patch) | |
tree | a3c007473841fc5840bff647451a1cd592427bbc /src/nvim/ex_cmds2.c | |
parent | 837360868b557dcb897690178d891c87e91fc27f (diff) | |
download | rneovim-e13c36e312a9128f5c2ffd5a444939efc43bc0b5.tar.gz rneovim-e13c36e312a9128f5c2ffd5a444939efc43bc0b5.tar.bz2 rneovim-e13c36e312a9128f5c2ffd5a444939efc43bc0b5.zip |
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)
https://github.com/vim/vim/commit/7a1637f4c00ac3d0cbf894803ada1586a1717470
Cherry-pick Test_options_command() change from patch 8.2.0540
Diffstat (limited to 'src/nvim/ex_cmds2.c')
-rw-r--r-- | src/nvim/ex_cmds2.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/nvim/ex_cmds2.c b/src/nvim/ex_cmds2.c index 45c05c9980..d4555f9917 100644 --- a/src/nvim/ex_cmds2.c +++ b/src/nvim/ex_cmds2.c @@ -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); } |