aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 6b40ccdb84..c6694cd489 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -358,14 +358,13 @@ newwindow:
msg(_(m_onlyone));
} else {
tabpage_T *oldtab = curtab;
- tabpage_T *newtab;
// First create a new tab with the window, then go back to
// the old tab and close the window there.
win_T *wp = curwin;
if (win_new_tabpage((int)Prenum, NULL) == OK
&& valid_tabpage(oldtab)) {
- newtab = curtab;
+ tabpage_T *newtab = curtab;
goto_tabpage_tp(oldtab, true, true);
if (curwin == wp) {
win_close(curwin, false, false);