diff options
author | jing <lhchenjw@gmail.com> | 2021-05-01 10:38:43 +0800 |
---|---|---|
committer | jing <lhchenjw@gmail.com> | 2021-05-06 23:45:16 +0800 |
commit | 8fecc5fab89c5141186d4ca2937f9aed8a361aa0 (patch) | |
tree | 6b735f66278e4857387265e3b48a018522078552 /src/nvim/window.c | |
parent | ec3524da29b4d3c6cdccb3ab3608f88e8c4ba183 (diff) | |
download | rneovim-8fecc5fab89c5141186d4ca2937f9aed8a361aa0.tar.gz rneovim-8fecc5fab89c5141186d4ca2937f9aed8a361aa0.tar.bz2 rneovim-8fecc5fab89c5141186d4ca2937f9aed8a361aa0.zip |
vim-patch:8.2.0137: crash when using win_execute() from a new tab
Problem: Crash when using win_execute() from a new tab.
Solution: Set the tp_*win pointers. (Ozaki Kiichi, closes vim/vim#5512)
https://github.com/vim/vim/commit/a44b3eeafa57d4904a3de86b132008b93404f0fd
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r-- | src/nvim/window.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c index bcd955d1b0..4fa6d8e63c 100644 --- a/src/nvim/window.c +++ b/src/nvim/window.c @@ -3459,6 +3459,9 @@ int win_alloc_first(void) first_tabpage = alloc_tabpage(); first_tabpage->tp_topframe = topframe; curtab = first_tabpage; + curtab->tp_firstwin = firstwin; + curtab->tp_lastwin = lastwin; + curtab->tp_curwin = curwin; return OK; } @@ -3627,6 +3630,8 @@ int win_new_tabpage(int after, char_u *filename) 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); |