summaryrefslogtreecommitdiff
path: root/src/window.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-01-20 21:44:31 +0100
committerBram Moolenaar <Bram@vim.org>2020-01-20 21:44:31 +0100
commita44b3eeafa57d4904a3de86b132008b93404f0fd (patch)
treeef84c42aa99e477e677eec09ec9d41086650736d /src/window.c
parented5adff1e6da412732514d82363005f85fe22e04 (diff)
downloadvim-git-a44b3eeafa57d4904a3de86b132008b93404f0fd.tar.gz
patch 8.2.0137: crash when using win_execute() from a new tabv8.2.0137
Problem: Crash when using win_execute() from a new tab. Solution: Set the tp_*win pointers. (Ozaki Kiichi, closes #5512)
Diffstat (limited to 'src/window.c')
-rw-r--r--src/window.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/window.c b/src/window.c
index 1096b6017..0c3c7f690 100644
--- a/src/window.c
+++ b/src/window.c
@@ -3616,6 +3616,9 @@ win_alloc_first(void)
return FAIL;
first_tabpage->tp_topframe = topframe;
curtab = first_tabpage;
+ curtab->tp_firstwin = firstwin;
+ curtab->tp_lastwin = lastwin;
+ curtab->tp_curwin = curwin;
return OK;
}
@@ -3854,6 +3857,8 @@ win_new_tabpage(int after)
newtp->tp_next = tp->tp_next;
tp->tp_next = newtp;
}
+ newtp->tp_firstwin = newtp->tp_lastwin = newtp->tp_curwin = curwin;
+
win_init_size();
firstwin->w_winrow = tabline_height();
win_comp_scroll(curwin);