aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ex_docmd.c
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-10-14 22:56:32 -0400
committerGitHub <noreply@github.com>2020-10-14 22:56:32 -0400
commit4b00916e940d35c351482b2bd5e3822796d030a3 (patch)
tree81d7f6880c7d05ff6985a1101d56c25ffc6a2aa0 /src/nvim/ex_docmd.c
parent759a05407f3e75cc002c0950563388735e969a94 (diff)
parent3183b09a5e0cce78be49e08cffb5208cf424e8c1 (diff)
downloadrneovim-4b00916e940d35c351482b2bd5e3822796d030a3.tar.gz
rneovim-4b00916e940d35c351482b2bd5e3822796d030a3.tar.bz2
rneovim-4b00916e940d35c351482b2bd5e3822796d030a3.zip
Merge pull request #13092 from janlazo/vim-8.1.1403
vim-patch:8.1.{95,103,221,269,975,978,1403,1569,1856,1983,2014,2365,2406},8.2.{573,616,710,957,1020,1036,1038,1743,1842,1843}
Diffstat (limited to 'src/nvim/ex_docmd.c')
-rw-r--r--src/nvim/ex_docmd.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/nvim/ex_docmd.c b/src/nvim/ex_docmd.c
index 3f4ad321e3..b4c634292c 100644
--- a/src/nvim/ex_docmd.c
+++ b/src/nvim/ex_docmd.c
@@ -6929,8 +6929,9 @@ void ex_splitview(exarg_T *eap)
{
win_T *old_curwin = curwin;
char_u *fname = NULL;
-
-
+ const bool use_tab = eap->cmdidx == CMD_tabedit
+ || eap->cmdidx == CMD_tabfind
+ || eap->cmdidx == CMD_tabnew;
/* A ":split" in the quickfix window works like ":new". Don't want two
* quickfix windows. But it's OK when doing ":tab split". */
@@ -6952,9 +6953,7 @@ void ex_splitview(exarg_T *eap)
/*
* Either open new tab page or split the window.
*/
- if (eap->cmdidx == CMD_tabedit
- || eap->cmdidx == CMD_tabfind
- || eap->cmdidx == CMD_tabnew) {
+ if (use_tab) {
if (win_new_tabpage(cmdmod.tab != 0 ? cmdmod.tab : eap->addr_count == 0
? 0 : (int)eap->line2 + 1, eap->arg) != FAIL) {
do_exedit(eap, old_curwin);