mirror of
https://github.com/neovim/neovim.git
synced 2025-09-15 15:58:17 +00:00
vim-patch:8.2.0422: crash when passing popup window to win_splitmove()
Problem: Crash when passing popup window to win_splitmove(). (john Devin)
Solution: Disallow moving a popup window. (closes vim/vim#5816)
0f1563ffee
Add translated test for 8.2.0422 (popup->floating)
This commit is contained in:
@@ -1619,6 +1619,23 @@ static void win_init_some(win_T *newp, win_T *oldp)
|
||||
win_copy_options(oldp, newp);
|
||||
}
|
||||
|
||||
/// Return TRUE if "win" is floating window in the current tab page.
|
||||
///
|
||||
/// @param win window to check
|
||||
bool win_valid_floating(const win_T *win)
|
||||
FUNC_ATTR_PURE FUNC_ATTR_WARN_UNUSED_RESULT
|
||||
{
|
||||
if (win == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
|
||||
if (wp == win) {
|
||||
return wp->w_floating;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Check if "win" is a pointer to an existing window in the current tabpage.
|
||||
///
|
||||
|
Reference in New Issue
Block a user