mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
fix(api): crash when moving curwin to other tabpage #35679
Problem: nvim_win_set_config may crash when attempting to move curwin to a different tabpage if there is no other non-float available to switch to. Solution: fix the crash. Fix ONE_WINDOW checks in winframe_find_altwin and win_altframe to consider floating windows by instead using one_window. Allow one_window to consider non-current tabpages. We can use one_window in win_close_othertab now to also better reflect its use in win_close. Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
This commit is contained in:
@@ -2730,7 +2730,7 @@ bool may_show_intro(void)
|
||||
&& (curbuf->b_fname == NULL)
|
||||
&& (curbuf->handle == 1)
|
||||
&& (curwin->handle == LOWEST_WIN_ID)
|
||||
&& one_window(curwin)
|
||||
&& one_window(curwin, NULL)
|
||||
&& (vim_strchr(p_shm, SHM_INTRO) == NULL));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user